1800 |
How can I highlight somehow the child bars of a summary bar
public void init() { COM com_Bar,com_Chart,com_Items; anytype var_Bar,var_Chart,var_Items; int hSummary,hTask; ; super(); exg2antt1.BeginUpdate(); exg2antt1.Columns().Add("Task"); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; /*should be called during the form's activate method*/ com_Chart.PaneWidth(false,128); com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("1/1/2001",213))); var_Bar = COM::createFromObject(com_Chart.Bars()).Item("Task"); com_Bar = var_Bar; com_Bar.Color(WinApi::RGB2int(240,240,240)); var_Items = exg2antt1.Items(); com_Items = var_Items; hSummary = com_Items.AddItem("Summary"); com_Items.AddBar(hSummary,"Project Summary",COMVariant::createFromDate(str2Date("1/2/2001",213)),COMVariant::createFromDate(str2Date("1/2/2001",213)),""); hTask = com_Items.InsertItem(hSummary,,"Task A"); com_Items.AddBar(hTask,"Task",COMVariant::createFromDate(str2Date("1/2/2001",213)),COMVariant::createFromDate(str2Date("1/5/2001",213)),"K1"); hTask = com_Items.InsertItem(hSummary,,"Task B"); com_Items.AddBar(hTask,"Task",COMVariant::createFromDate(str2Date("1/4/2001",213)),COMVariant::createFromDate(str2Date("1/8/2001",213)),"K2"); hTask = com_Items.InsertItem(hSummary,,"Task C"); com_Items.AddBar(hTask,"Task",COMVariant::createFromDate(str2Date("1/6/2001",213)),COMVariant::createFromDate(str2Date("1/10/2001",213)),"K3"); com_Items.ExpandItem(hSummary,true); com_Items.DefineSummaryBars(hSummary,"",-1,"<*>"); com_Items.ItemBar(hSummary,"",34/*exSummaryBarBackColor*/,COMVariant::createFromInt(65536)); com_Items.ItemBar(hSummary,"",35/*exSummaryBarBackColorTransparent*/,COMVariant::createFromInt(50)); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(false,128); } */ |
1799 |
How do I change the color for the selected bars, without showing the frame arround
public void init() { COM com_Chart,com_Items; anytype var_Chart,var_Items; ; super(); exg2antt1.BeginUpdate(); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("1/1/2002",213))); com_Chart.SelBarColor(0x7f0000ff); /*should be called during the form's activate method*/ com_Chart.PaneWidth(0,48); exg2antt1.Columns().Add("Task"); var_Items = exg2antt1.Items(); com_Items = var_Items; com_Items.AddBar(com_Items.AddItem("Task 1"),"Task",COMVariant::createFromDate(str2Date("1/2/2002",213)),COMVariant::createFromDate(str2Date("1/4/2002",213)),"A"); com_Items.AddBar(com_Items.AddItem("Task 2"),"Task",COMVariant::createFromDate(str2Date("1/6/2002",213)),COMVariant::createFromDate(str2Date("1/10/2002",213)),"B"); com_Items.AddBar(com_Items.AddItem("Task 3"),"Task",COMVariant::createFromDate(str2Date("1/11/2002",213)),COMVariant::createFromDate(str2Date("1/14/2002",213)),"C"); com_Items.ItemBar(0,"<A B>",257/*exBarSelected*/,COMVariant::createFromBoolean(true)); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(0,48); } */ |
1798 |
Is it possible to enumerate the activities/bars of critical path
// BarResize event - Occurs when a bar is moved or resized. void onEvent_BarResize(int _Item,COMVariant _Key) { ; exg2antt1.Items().SchedulePDM(_Item,_Key); } public void init() { COM com_Bar,com_Chart,com_Items; anytype var_Bar,var_Chart,var_Items; int h1,h2,h3,h4,hSummary1; ; super(); exg2antt1.BeginUpdate(); exg2antt1.Columns().Add("Tasks"); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; com_Chart.LevelCount(2); com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("1/1/2001",213))); /*should be called during the form's activate method*/ com_Chart.PaneWidth(false,96); var_Bar = COM::createFromObject(com_Chart.Bars()).Item("Task"); com_Bar = var_Bar; com_Bar.Def(3/*exBarCaption*/,"<%=int(%269) > 0 ? (`<b>` + %269 + `</b>`) : ``%>"); var_Items = exg2antt1.Items(); com_Items = var_Items; hSummary1 = com_Items.AddItem("Summary"); com_Items.ItemBold(hSummary1,true); com_Items.AddBar(hSummary1,"Summary",COMVariant::createFromDate(str2Date("1/2/2001",213)),COMVariant::createFromDate(str2Date("1/2/2001",213)),"sum"); h1 = com_Items.AddItem("Task 1"); com_Items.AddBar(h1,"Task",COMVariant::createFromDate(str2Date("1/2/2001",213)),COMVariant::createFromDate(str2Date("1/4/2001",213))); com_Items.DefineSummaryBars(hSummary1,"sum",h1,""); h2 = com_Items.AddItem("Task 2"); com_Items.AddBar(h2,"Task",COMVariant::createFromDate(str2Date("1/2/2001",213)),COMVariant::createFromDate(str2Date("1/4/2001",213))); com_Items.DefineSummaryBars(hSummary1,"sum",h2,""); com_Items.AddLink("L1",h1,"",h2,""); h3 = com_Items.AddItem("Task 3"); com_Items.AddBar(h3,"Task",COMVariant::createFromDate(str2Date("1/2/2001",213)),COMVariant::createFromDate(str2Date("1/4/2001",213))); com_Items.DefineSummaryBars(hSummary1,"sum",h3,""); com_Items.AddLink("L2",h2,"",h3,""); h4 = com_Items.AddItem("Task 4"); com_Items.AddBar(h4,"Task",COMVariant::createFromDate(str2Date("1/2/2001",213)),COMVariant::createFromDate(str2Date("1/4/2001",213))); com_Items.DefineSummaryBars(hSummary1,"sum",h4,""); com_Items.AddLink("L3",h1,"",h4,""); com_Items.DefSchedulePDM(5/*exPDMCriticalPathBarColor*/,COMVariant::createFromInt(65280)); com_Items.SchedulePDM(h1,""); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(false,96); } */ |
1797 |
How can I add a SF link
public void init() { COM com_Chart,com_Items; anytype var_Chart,var_Items; int h1,h2,h3,h4,h5; ; super(); exg2antt1.BeginUpdate(); exg2antt1.Columns().Add("Task"); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("12/25/2000",213))); /*should be called during the form's activate method*/ com_Chart.PaneWidth(false,48); com_Chart.LevelCount(2); var_Items = exg2antt1.Items(); com_Items = var_Items; h1 = com_Items.AddItem("Task 1"); com_Items.AddBar(h1,"Task",COMVariant::createFromDate(str2Date("1/2/2001",213)),COMVariant::createFromDate(str2Date("1/4/2001",213)),"K1"); h2 = com_Items.AddItem("Task 2"); com_Items.AddBar(h2,"Task",COMVariant::createFromDate(str2Date("1/2/2001",213)),COMVariant::createFromDate(str2Date("1/5/2001",213)),"K2"); h3 = com_Items.AddItem("Task 3"); com_Items.AddBar(h3,"Task",COMVariant::createFromDate(str2Date("1/2/2001",213)),COMVariant::createFromDate(str2Date("1/5/2001",213)),"K3"); h4 = com_Items.AddItem("Task 4"); com_Items.AddBar(h4,"Task",COMVariant::createFromDate(str2Date("1/2/2001",213)),COMVariant::createFromDate(str2Date("1/5/2001",213)),"K4"); h5 = com_Items.AddItem("Task 5"); com_Items.AddBar(h5,"Task",COMVariant::createFromDate(str2Date("1/2/2001",213)),COMVariant::createFromDate(str2Date("1/5/2001",213)),"K5"); com_Items.AddLink("L1",h1,"K1",h2,"K2"); com_Items.AddLink("L2",h2,"K2",h3,"K3"); com_Items.AddLink("L3",h3,"K3",h4,"K4"); com_Items.AddLink("L4",h4,"K4",h5,"K5"); com_Items.Link("L4",6/*exLinkStartPos*/,COMVariant::createFromInt(0)); com_Items.Link("L4",7/*exLinkEndPos*/,COMVariant::createFromInt(2)); com_Items.Link("L4",8/*exLinkColor*/,COMVariant::createFromInt(65280)); com_Items.SchedulePDM(0,"K5"); exg2antt1.Chart().ShowLinks(1/*exShowExtendedLinks*/); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(false,48); } */ |
1796 |
How do I get the Start and End date of a bar
public void init() { COM com_Chart,com_Items; anytype var_Chart,var_Items; int h; ; super(); exg2antt1.BeginUpdate(); exg2antt1.Columns().Add("Tasks"); exg2antt1.Debug(true); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("9/20/2006",213))); com_Chart.LevelCount(2); /*should be called during the form's activate method*/ com_Chart.PaneWidth(0,96); var_Items = exg2antt1.Items(); com_Items = var_Items; com_Items.AddBar(com_Items.AddItem("Task 1"),"Task",COMVariant::createFromDate(str2Date("9/21/2006",213)),COMVariant::createFromDate(str2Date("9/24/2006",213)),"K1"); com_Items.AddBar(com_Items.AddItem("Task 2"),"Task",COMVariant::createFromDate(str2Date("9/22/2006",213)),COMVariant::createFromDate(str2Date("9/25/2006",213)),"K2"); com_Items.AddBar(com_Items.AddItem("Task 3"),"Task",COMVariant::createFromDate(str2Date("9/23/2006",213)),COMVariant::createFromDate(str2Date("9/26/2006",213)),"K3"); h = com_Items.ItemByIndex(1); com_Items.ItemBold(h,true); print( "Start of " ); print( com_Items.FirstItemBar(h) ); print( com_Items.ItemBar(h,com_Items.FirstItemBar(h),1/*exBarStart*/) ); print( "End of " ); print( com_Items.FirstItemBar(h) ); print( com_Items.ItemBar(h,com_Items.FirstItemBar(h),2/*exBarEnd*/) ); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(0,96); } */ |
1795 |
I haven't found options to change/localize (in German, or my current regional settings) the captions/text/strings ( dates, tooltip ) that shows in the chart area (method 2)
public void init() { COM com_Chart; anytype var_Chart; ; super(); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; com_Chart.FirstWeekDay(com_Chart.LocFirstWeekDay()); com_Chart.MonthNames(com_Chart.LocMonthNames()); com_Chart.WeekDays(com_Chart.LocWeekDays()); com_Chart.AMPM(com_Chart.LocAMPM()); com_Chart.LevelCount(2); /*should be called during the form's activate method*/ com_Chart.PaneWidth(false,0); com_Chart.UnitScale(4096/*exDay*/); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(false,0); } */ |
1794 |
Is it possible to change caption of the print and print preview, as it just says "Untitled Document", but I cant find the code that writes this caption
public void init() { COM com_Items,com_Print; anytype var_Items,var_Print; int h1,h2; ; super(); exg2antt1.BeginUpdate(); exg2antt1.Columns().Add("Task"); exg2antt1.Chart().FirstVisibleDate(COMVariant::createFromDate(str2Date("1/1/2001",213))); var_Items = exg2antt1.Items(); com_Items = var_Items; h1 = com_Items.AddItem("Task 1"); com_Items.AddBar(h1,"Task",COMVariant::createFromDate(str2Date("1/2/2001",213)),COMVariant::createFromDate(str2Date("1/4/2001",213)),"K1"); h2 = com_Items.AddItem("Task 2"); com_Items.AddBar(h2,"Task",COMVariant::createFromDate(str2Date("1/5/2001",213)),COMVariant::createFromDate(str2Date("1/7/2001",213)),"K2"); com_Items.AddLink("L1",h1,"K1",h2,"K2"); exg2antt1.EndUpdate(); // Add 'exprint.dll(ExPrint.dll)' reference to your project. // Add 'ExPrint 1.0 Control Library(ExPrint.dll)' reference to your project. var_Print = COM::createFromObject(new EXPRINTLib.exprint()); com_Print = var_Print; com_Print.Caption("This is your new caption for print and print preview"); com_Print.AutoRelease(false); com_Print.PrintExt(exg2antt1); com_Print.Preview(); } |
1793 |
Is it possible to specify the A4 paper size for the print preview
public void init() { COM com_Items,com_Print; anytype var_Items,var_Print; int h1,h2; ; super(); exg2antt1.BeginUpdate(); exg2antt1.Columns().Add("Task"); exg2antt1.Chart().FirstVisibleDate(COMVariant::createFromDate(str2Date("1/1/2001",213))); var_Items = exg2antt1.Items(); com_Items = var_Items; h1 = com_Items.AddItem("Task 1"); com_Items.AddBar(h1,"Task",COMVariant::createFromDate(str2Date("1/2/2001",213)),COMVariant::createFromDate(str2Date("1/4/2001",213)),"K1"); h2 = com_Items.AddItem("Task 2"); com_Items.AddBar(h2,"Task",COMVariant::createFromDate(str2Date("1/5/2001",213)),COMVariant::createFromDate(str2Date("1/7/2001",213)),"K2"); com_Items.AddLink("L1",h1,"K1",h2,"K2"); exg2antt1.EndUpdate(); // Add 'exprint.dll(ExPrint.dll)' reference to your project. // Add 'ExPrint 1.0 Control Library(ExPrint.dll)' reference to your project. var_Print = COM::createFromObject(new EXPRINTLib.exprint()); com_Print = var_Print; com_Print.Settings(0/*exPaperSize*/,COMVariant::createFromInt(9)); com_Print.AutoRelease(false); com_Print.PrintExt(exg2antt1); com_Print.Preview(); } |
1792 |
Is it possible to tell the print preview to open up in "landscape mode" by default, not in "portrait mode"
public void init() { COM com_Items,com_Print; anytype var_Items,var_Print; int h1,h2; ; super(); exg2antt1.BeginUpdate(); exg2antt1.Columns().Add("Task"); exg2antt1.Chart().FirstVisibleDate(COMVariant::createFromDate(str2Date("1/1/2001",213))); var_Items = exg2antt1.Items(); com_Items = var_Items; h1 = com_Items.AddItem("Task 1"); com_Items.AddBar(h1,"Task",COMVariant::createFromDate(str2Date("1/2/2001",213)),COMVariant::createFromDate(str2Date("1/4/2001",213)),"K1"); h2 = com_Items.AddItem("Task 2"); com_Items.AddBar(h2,"Task",COMVariant::createFromDate(str2Date("1/5/2001",213)),COMVariant::createFromDate(str2Date("1/7/2001",213)),"K2"); com_Items.AddLink("L1",h1,"K1",h2,"K2"); exg2antt1.EndUpdate(); // Add 'exprint.dll(ExPrint.dll)' reference to your project. // Add 'ExPrint 1.0 Control Library(ExPrint.dll)' reference to your project. var_Print = COM::createFromObject(new EXPRINTLib.exprint()); com_Print = var_Print; com_Print.PageOrientation(2/*exLandscape*/); com_Print.AutoRelease(false); com_Print.PrintExt(exg2antt1); com_Print.Preview(); } |
1791 |
How do I prevent a caption outside the bar from overlapping other bars
public void init() { COM com_Bar,com_Bars,com_Chart,com_Items; anytype var_Bar,var_Bars,var_Chart,var_Items; int h; ; super(); exg2antt1.BeginUpdate(); exg2antt1.ScrollBySingleLine(true); exg2antt1.Columns().Add("Task"); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("1/1/2001",213))); /*should be called during the form's activate method*/ com_Chart.PaneWidth(false,48); var_Bars = COM::createFromObject(com_Chart.Bars()); com_Bars = var_Bars; com_Bars.Copy("Task","Default-Task"); var_Bar = COM::createFromObject(com_Chart.Bars()).Item("Task"); com_Bar = var_Bar; com_Bar.OverlaidType(4611/*exOverlaidBarsIncludeCaption | exOverlaidBarsStackAutoArrange | exOverlaidBarsStack*/); var_Items = exg2antt1.Items(); com_Items = var_Items; h = com_Items.AddItem("Task 1"); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("1/2/2001",213)),COMVariant::createFromDate(str2Date("1/4/2001",213)),"A1","task"); com_Items.ItemBar(h,"A1",4/*exBarHAlignCaption*/,COMVariant::createFromInt(18)); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("1/6/2001",213)),COMVariant::createFromDate(str2Date("1/10/2001",213)),"A2","task"); com_Items.ItemBar(h,"A2",4/*exBarHAlignCaption*/,COMVariant::createFromInt(16)); h = com_Items.AddItem("Task 2"); com_Items.AddBar(h,"Default-Task",COMVariant::createFromDate(str2Date("1/2/2001",213)),COMVariant::createFromDate(str2Date("1/4/2001",213)),"A1","task"); com_Items.ItemBar(h,"A1",4/*exBarHAlignCaption*/,COMVariant::createFromInt(18)); com_Items.AddBar(h,"Default-Task",COMVariant::createFromDate(str2Date("1/6/2001",213)),COMVariant::createFromDate(str2Date("1/10/2001",213)),"A2","task"); com_Items.ItemBar(h,"A2",4/*exBarHAlignCaption*/,COMVariant::createFromInt(16)); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(false,48); } */ |
1790 |
How do I clip/hide/align the bar's extra-caption/text based on the bar's size/width/length
public void init() { COM com_Bar,com_Chart,com_Items; anytype var_Bar,var_Chart,var_Items; int h; ; super(); exg2antt1.BeginUpdate(); exg2antt1.Columns().Add("Clip"); exg2antt1.ScrollBySingleLine(true); exg2antt1.DrawGridLines(-2/*exRowLines*/); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; com_Chart.AllowResizeChart(6/*exAllowResizeChartMiddle | exAllowResizeChartHeader*/); com_Chart.DrawGridLines(-2/*exRowLines*/); com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("12/23/2000",213))); com_Chart.LevelCount(2); /*should be called during the form's activate method*/ com_Chart.PaneWidth(false,216); var_Bar = COM::createFromObject(com_Chart.Bars()).Item("Task"); com_Bar = var_Bar; com_Bar.Pattern(32/*exPatternBox*/); com_Bar.Color(WinApi::RGB2int(164,164,164)); com_Bar.StartColor(WinApi::RGB2int(240,240,240)); com_Bar.EndColor(com_Bar.StartColor()); com_Bar.OverlaidType(4611/*exOverlaidBarsIncludeCaption | exOverlaidBarsStackAutoArrange | exOverlaidBarsStack*/); com_Bar.Height(15); com_Chart.MinUnitWidth(com_Chart.UnitWidth()); var_Items = exg2antt1.Items(); com_Items = var_Items; h = com_Items.AddItem("no clip, (0-2)"); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("1/2/2001",213)),COMVariant::createFromDate(str2Date("1/4/2001",213)),"K1"); com_Items.ItemBar(h,"K1",44/*exBarExtraCaption*/,"no clip, right(<b>2</b>)"); com_Items.ItemBar(h,"K1",45/*exBarExtraCaptionHAlign*/,COMVariant::createFromInt(2)); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("1/2/2001",213)),COMVariant::createFromDate(str2Date("1/4/2001",213)),"K2"); com_Items.ItemBar(h,"K2",44/*exBarExtraCaption*/,"no clip, center(<b>1</b>)"); com_Items.ItemBar(h,"K2",45/*exBarExtraCaptionHAlign*/,COMVariant::createFromInt(1)); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("1/2/2001",213)),COMVariant::createFromDate(str2Date("1/4/2001",213)),"K3",""); com_Items.ItemBar(h,"K3",44/*exBarExtraCaption*/,"no clip, left(<b>0</b>)"); com_Items.ItemBar(h,"K3",45/*exBarExtraCaptionHAlign*/,COMVariant::createFromInt(0)); h = com_Items.AddItem("clip, inside (3-5)"); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("12/28/2000",213)),COMVariant::createFromDate(str2Date("1/8/2001",213)),"K1"); com_Items.ItemBar(h,"K1",44/*exBarExtraCaption*/,"clip, inside, right(<b>5</b>)"); com_Items.ItemBar(h,"K1",45/*exBarExtraCaptionHAlign*/,COMVariant::createFromInt(5)); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("12/28/2000",213)),COMVariant::createFromDate(str2Date("1/8/2001",213)),"K2"); com_Items.ItemBar(h,"K2",44/*exBarExtraCaption*/,"clip, inside, center(<b>4</b>)"); com_Items.ItemBar(h,"K2",45/*exBarExtraCaptionHAlign*/,COMVariant::createFromInt(4)); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("12/28/2000",213)),COMVariant::createFromDate(str2Date("1/8/2001",213)),"K3"); com_Items.ItemBar(h,"K3",44/*exBarExtraCaption*/,"clip, inside, left(<b>3</b>)"); com_Items.ItemBar(h,"K3",45/*exBarExtraCaptionHAlign*/,COMVariant::createFromInt(3)); h = com_Items.AddItem("hide on min width, clip if not fit, inside (6-8)"); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("12/26/2000",213)),COMVariant::createFromDate(str2Date("1/10/2001",213)),"K1"); com_Items.ItemBar(h,"K1",44/*exBarExtraCaption*/,"hide on min width, clip if not fit, inside, right(<b>8</b>)"); com_Items.ItemBar(h,"K1",45/*exBarExtraCaptionHAlign*/,COMVariant::createFromInt(8)); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("12/26/2000",213)),COMVariant::createFromDate(str2Date("1/10/2001",213)),"K2"); com_Items.ItemBar(h,"K2",44/*exBarExtraCaption*/,"hide on min width, clip if not fit, inside, center(<b>7</b>)"); com_Items.ItemBar(h,"K2",45/*exBarExtraCaptionHAlign*/,COMVariant::createFromInt(7)); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("12/26/2000",213)),COMVariant::createFromDate(str2Date("1/10/2001",213)),"K3"); com_Items.ItemBar(h,"K3",44/*exBarExtraCaption*/,"hide on min width, clip if not fit, inside, left(<b>6</b>)"); com_Items.ItemBar(h,"K3",45/*exBarExtraCaptionHAlign*/,COMVariant::createFromInt(6)); h = com_Items.AddItem("hide if not fit, no clip, inside (9-11)"); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("12/28/2000",213)),COMVariant::createFromDate(str2Date("1/8/2001",213)),"K1"); com_Items.ItemBar(h,"K1",44/*exBarExtraCaption*/,"hide if not fit, no clip, inside, right(<b>11</b>)"); com_Items.ItemBar(h,"K1",45/*exBarExtraCaptionHAlign*/,COMVariant::createFromInt(11)); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("12/28/2000",213)),COMVariant::createFromDate(str2Date("1/8/2001",213)),"K2"); com_Items.ItemBar(h,"K2",44/*exBarExtraCaption*/,"hide if not fit, no clip, center(<b>10</b>)"); com_Items.ItemBar(h,"K2",45/*exBarExtraCaptionHAlign*/,COMVariant::createFromInt(10)); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("12/28/2000",213)),COMVariant::createFromDate(str2Date("1/8/2001",213)),"K3"); com_Items.ItemBar(h,"K3",44/*exBarExtraCaption*/,"hide if not fit, no clip, inside, left(<b>9</b>)"); com_Items.ItemBar(h,"K3",45/*exBarExtraCaptionHAlign*/,COMVariant::createFromInt(9)); h = com_Items.AddItem("no clip, inside, outside (12-14)"); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("12/28/2000",213)),COMVariant::createFromDate(str2Date("1/8/2001",213)),"K1"); com_Items.ItemBar(h,"K1",44/*exBarExtraCaption*/,"no clip, inside, outside, right(<b>14</b>)"); com_Items.ItemBar(h,"K1",45/*exBarExtraCaptionHAlign*/,COMVariant::createFromInt(14)); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("12/28/2000",213)),COMVariant::createFromDate(str2Date("1/8/2001",213)),"K2"); com_Items.ItemBar(h,"K2",44/*exBarExtraCaption*/,"no clip, inside, outside, center(<b>13</b>)"); com_Items.ItemBar(h,"K2",45/*exBarExtraCaptionHAlign*/,COMVariant::createFromInt(13)); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("12/28/2000",213)),COMVariant::createFromDate(str2Date("1/8/2001",213)),"K3"); com_Items.ItemBar(h,"K3",44/*exBarExtraCaption*/,"no clip, inside, outside, left(<b>12</b>)"); com_Items.ItemBar(h,"K3",45/*exBarExtraCaptionHAlign*/,COMVariant::createFromInt(12)); h = com_Items.AddItem("no clip, outside (16-18)"); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("12/30/2000",213)),COMVariant::createFromDate(str2Date("1/6/2001",213)),"K1"); com_Items.ItemBar(h,"K1",44/*exBarExtraCaption*/,"no clip, outside, right(<b>18</b>)"); com_Items.ItemBar(h,"K1",45/*exBarExtraCaptionHAlign*/,COMVariant::createFromInt(18)); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("12/30/2000",213)),COMVariant::createFromDate(str2Date("1/6/2001",213)),"K2"); com_Items.ItemBar(h,"K2",44/*exBarExtraCaption*/,"no clip, outside, center(<b>17</b>)"); com_Items.ItemBar(h,"K2",45/*exBarExtraCaptionHAlign*/,COMVariant::createFromInt(17)); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("12/30/2000",213)),COMVariant::createFromDate(str2Date("1/6/2001",213)),"K3"); com_Items.ItemBar(h,"K3",44/*exBarExtraCaption*/,"no clip, outside, left(<b>16</b>)"); com_Items.ItemBar(h,"K3",45/*exBarExtraCaptionHAlign*/,COMVariant::createFromInt(16)); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(false,216); } */ |
1789 |
What options do I have to show the links between bars (rectangular SEV, starts vertically, ends vertically)
public void init() { COM com_Chart,com_Items; anytype var_Chart,var_Items; int h1,h2,h3; ; super(); exg2antt1.BeginUpdate(); exg2antt1.AntiAliasing(true); exg2antt1.Columns().Add("Task"); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("1/1/2001",213))); /*should be called during the form's activate method*/ com_Chart.PaneWidth(false,128); com_Chart.NonworkingDays(0); com_Chart.LinksWidth(2); var_Items = exg2antt1.Items(); com_Items = var_Items; com_Items.AddItem(""); h3 = com_Items.AddItem("Task 3"); com_Items.AddItem(""); com_Items.AddBar(h3,"Task",COMVariant::createFromDate(str2Date("1/13/2001",213)),COMVariant::createFromDate(str2Date("1/15/2001",213)),"K3"); h1 = com_Items.AddItem("Task 1"); com_Items.AddItem(""); com_Items.AddBar(h1,"Task",COMVariant::createFromDate(str2Date("1/2/2001",213)),COMVariant::createFromDate(str2Date("1/4/2001",213)),"K1"); h2 = com_Items.AddItem("Task 2"); com_Items.AddBar(h2,"Task",COMVariant::createFromDate(str2Date("1/7/2001",213)),COMVariant::createFromDate(str2Date("1/9/2001",213)),"K2"); com_Items.AddItem(""); com_Items.AddLink("L1",h1,"K1",h2,"K2"); com_Items.AddLink("L2",h2,"K2",h3,"K3"); com_Items.Link("<*>",15/*exLinkShowRound*/,COMVariant::createFromInt(5)); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(false,128); } */ |
1788 |
What options do I have to show the links between bars (rectangular SV, starts vertically, ends horizontally)
public void init() { COM com_Chart,com_Items; anytype var_Chart,var_Items; int h1,h2,h3; ; super(); exg2antt1.BeginUpdate(); exg2antt1.AntiAliasing(true); exg2antt1.Columns().Add("Task"); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("1/1/2001",213))); /*should be called during the form's activate method*/ com_Chart.PaneWidth(false,128); com_Chart.NonworkingDays(0); com_Chart.LinksWidth(2); var_Items = exg2antt1.Items(); com_Items = var_Items; com_Items.AddItem(""); h3 = com_Items.AddItem("Task 3"); com_Items.AddItem(""); com_Items.AddBar(h3,"Task",COMVariant::createFromDate(str2Date("1/13/2001",213)),COMVariant::createFromDate(str2Date("1/15/2001",213)),"K3"); h1 = com_Items.AddItem("Task 1"); com_Items.AddItem(""); com_Items.AddBar(h1,"Task",COMVariant::createFromDate(str2Date("1/2/2001",213)),COMVariant::createFromDate(str2Date("1/4/2001",213)),"K1"); h2 = com_Items.AddItem("Task 2"); com_Items.AddBar(h2,"Task",COMVariant::createFromDate(str2Date("1/7/2001",213)),COMVariant::createFromDate(str2Date("1/9/2001",213)),"K2"); com_Items.AddItem(""); com_Items.AddLink("L1",h1,"K1",h2,"K2"); com_Items.AddLink("L2",h2,"K2",h3,"K3"); com_Items.Link("<*>",15/*exLinkShowRound*/,COMVariant::createFromInt(4)); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(false,128); } */ |
1787 |
What options do I have to show the links between bars (rectangular EV, starts horizontally, ends vertically)
public void init() { COM com_Chart,com_Items; anytype var_Chart,var_Items; int h1,h2,h3; ; super(); exg2antt1.BeginUpdate(); exg2antt1.AntiAliasing(true); exg2antt1.Columns().Add("Task"); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("1/1/2001",213))); /*should be called during the form's activate method*/ com_Chart.PaneWidth(false,128); com_Chart.NonworkingDays(0); com_Chart.LinksWidth(2); var_Items = exg2antt1.Items(); com_Items = var_Items; com_Items.AddItem(""); h3 = com_Items.AddItem("Task 3"); com_Items.AddItem(""); com_Items.AddBar(h3,"Task",COMVariant::createFromDate(str2Date("1/13/2001",213)),COMVariant::createFromDate(str2Date("1/15/2001",213)),"K3"); h1 = com_Items.AddItem("Task 1"); com_Items.AddItem(""); com_Items.AddBar(h1,"Task",COMVariant::createFromDate(str2Date("1/2/2001",213)),COMVariant::createFromDate(str2Date("1/4/2001",213)),"K1"); h2 = com_Items.AddItem("Task 2"); com_Items.AddBar(h2,"Task",COMVariant::createFromDate(str2Date("1/7/2001",213)),COMVariant::createFromDate(str2Date("1/9/2001",213)),"K2"); com_Items.AddItem(""); com_Items.AddLink("L1",h1,"K1",h2,"K2"); com_Items.AddLink("L2",h2,"K2",h3,"K3"); com_Items.Link("<*>",15/*exLinkShowRound*/,COMVariant::createFromInt(3)); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(false,128); } */ |
1786 |
What options do I have to show the links between bars (straight)
public void init() { COM com_Chart,com_Items; anytype var_Chart,var_Items; int h1,h2,h3; ; super(); exg2antt1.BeginUpdate(); exg2antt1.AntiAliasing(true); exg2antt1.Columns().Add("Task"); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("1/1/2001",213))); /*should be called during the form's activate method*/ com_Chart.PaneWidth(false,128); com_Chart.NonworkingDays(0); com_Chart.LinksWidth(2); var_Items = exg2antt1.Items(); com_Items = var_Items; com_Items.AddItem(""); h3 = com_Items.AddItem("Task 3"); com_Items.AddItem(""); com_Items.AddBar(h3,"Task",COMVariant::createFromDate(str2Date("1/13/2001",213)),COMVariant::createFromDate(str2Date("1/15/2001",213)),"K3"); h1 = com_Items.AddItem("Task 1"); com_Items.AddItem(""); com_Items.AddBar(h1,"Task",COMVariant::createFromDate(str2Date("1/2/2001",213)),COMVariant::createFromDate(str2Date("1/4/2001",213)),"K1"); h2 = com_Items.AddItem("Task 2"); com_Items.AddBar(h2,"Task",COMVariant::createFromDate(str2Date("1/7/2001",213)),COMVariant::createFromDate(str2Date("1/9/2001",213)),"K2"); com_Items.AddItem(""); com_Items.AddLink("L1",h1,"K1",h2,"K2"); com_Items.AddLink("L2",h2,"K2",h3,"K3"); com_Items.Link("<*>",15/*exLinkShowRound*/,COMVariant::createFromInt(2)); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(false,128); } */ |
1785 |
What options do I have to show the links between bars (direct)
public void init() { COM com_Chart,com_Items; anytype var_Chart,var_Items; int h1,h2,h3; ; super(); exg2antt1.BeginUpdate(); exg2antt1.AntiAliasing(true); exg2antt1.Columns().Add("Task"); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("1/1/2001",213))); /*should be called during the form's activate method*/ com_Chart.PaneWidth(false,128); com_Chart.NonworkingDays(0); com_Chart.LinksWidth(2); var_Items = exg2antt1.Items(); com_Items = var_Items; com_Items.AddItem(""); h3 = com_Items.AddItem("Task 3"); com_Items.AddItem(""); com_Items.AddBar(h3,"Task",COMVariant::createFromDate(str2Date("1/13/2001",213)),COMVariant::createFromDate(str2Date("1/15/2001",213)),"K3"); h1 = com_Items.AddItem("Task 1"); com_Items.AddItem(""); com_Items.AddBar(h1,"Task",COMVariant::createFromDate(str2Date("1/2/2001",213)),COMVariant::createFromDate(str2Date("1/4/2001",213)),"K1"); h2 = com_Items.AddItem("Task 2"); com_Items.AddBar(h2,"Task",COMVariant::createFromDate(str2Date("1/7/2001",213)),COMVariant::createFromDate(str2Date("1/9/2001",213)),"K2"); com_Items.AddItem(""); com_Items.AddLink("L1",h1,"K1",h2,"K2"); com_Items.AddLink("L2",h2,"K2",h3,"K3"); com_Items.Link("<*>",15/*exLinkShowRound*/,COMVariant::createFromInt(1)); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(false,128); } */ |
1784 |
What options do I have to show the links between bars (round)
public void init() { COM com_Chart,com_Items; anytype var_Chart,var_Items; int h1,h2,h3; ; super(); exg2antt1.BeginUpdate(); exg2antt1.AntiAliasing(true); exg2antt1.Columns().Add("Task"); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("1/1/2001",213))); /*should be called during the form's activate method*/ com_Chart.PaneWidth(false,128); com_Chart.NonworkingDays(0); com_Chart.LinksWidth(2); var_Items = exg2antt1.Items(); com_Items = var_Items; com_Items.AddItem(""); h3 = com_Items.AddItem("Task 3"); com_Items.AddItem(""); com_Items.AddBar(h3,"Task",COMVariant::createFromDate(str2Date("1/13/2001",213)),COMVariant::createFromDate(str2Date("1/15/2001",213)),"K3"); h1 = com_Items.AddItem("Task 1"); com_Items.AddItem(""); com_Items.AddBar(h1,"Task",COMVariant::createFromDate(str2Date("1/2/2001",213)),COMVariant::createFromDate(str2Date("1/4/2001",213)),"K1"); h2 = com_Items.AddItem("Task 2"); com_Items.AddBar(h2,"Task",COMVariant::createFromDate(str2Date("1/7/2001",213)),COMVariant::createFromDate(str2Date("1/9/2001",213)),"K2"); com_Items.AddItem(""); com_Items.AddLink("L1",h1,"K1",h2,"K2"); com_Items.AddLink("L2",h2,"K2",h3,"K3"); com_Items.Link("<*>",15/*exLinkShowRound*/,COMVariant::createFromInt(-1)); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(false,128); } */ |
1783 |
What options do I have to show the links between bars (rectangular, default)
public void init() { COM com_Chart,com_Items; anytype var_Chart,var_Items; int h1,h2,h3; ; super(); exg2antt1.BeginUpdate(); exg2antt1.AntiAliasing(true); exg2antt1.Columns().Add("Task"); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("1/1/2001",213))); /*should be called during the form's activate method*/ com_Chart.PaneWidth(false,128); com_Chart.NonworkingDays(0); com_Chart.LinksWidth(2); var_Items = exg2antt1.Items(); com_Items = var_Items; com_Items.AddItem(""); h3 = com_Items.AddItem("Task 3"); com_Items.AddItem(""); com_Items.AddBar(h3,"Task",COMVariant::createFromDate(str2Date("1/13/2001",213)),COMVariant::createFromDate(str2Date("1/15/2001",213)),"K3"); h1 = com_Items.AddItem("Task 1"); com_Items.AddItem(""); com_Items.AddBar(h1,"Task",COMVariant::createFromDate(str2Date("1/2/2001",213)),COMVariant::createFromDate(str2Date("1/4/2001",213)),"K1"); h2 = com_Items.AddItem("Task 2"); com_Items.AddBar(h2,"Task",COMVariant::createFromDate(str2Date("1/7/2001",213)),COMVariant::createFromDate(str2Date("1/9/2001",213)),"K2"); com_Items.AddItem(""); com_Items.AddLink("L1",h1,"K1",h2,"K2"); com_Items.AddLink("L2",h2,"K2",h3,"K3"); com_Items.Link("<*>",15/*exLinkShowRound*/,COMVariant::createFromInt(0)); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(false,128); } */ |
1782 |
I have a question about whether the control has the functionality to add two bars on the same item, as one would correspond to the item bar and another bar their progress, but progress is required to show dividedly at different times outside the activity bar item
public void init() { COM com_Bar,com_Bar1,com_Bar2,com_Bars,com_Chart,com_Items; anytype var_Bar,var_Bar1,var_Bar2,var_Bars,var_Chart,var_Items; int h; ; super(); exg2antt1.BeginUpdate(); exg2antt1.Columns().Add("Tasks"); exg2antt1.BackColorLevelHeader(exg2antt1.BackColor()); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; com_Chart.LevelCount(2); com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("9/20/2006",213))); /*should be called during the form's activate method*/ com_Chart.PaneWidth(0,64); var_Bars = COM::createFromObject(com_Chart.Bars()); com_Bars = var_Bars; var_Bar = COM::createFromObject(com_Bars).Copy("Progress","TProgressD"); com_Bar = var_Bar; com_Bar.Def(4/*exBarHAlignCaption*/,COMVariant::createFromInt(18)); com_Bar.Shape(20/*exShapeThinDown*/); var_Bars = COM::createFromObject(com_Chart.Bars()); com_Bars = var_Bars; var_Bar1 = COM::createFromObject(com_Bars).Copy("Progress","TProgressC"); com_Bar1 = var_Bar1; com_Bar1.Def(4/*exBarHAlignCaption*/,COMVariant::createFromInt(18)); var_Bars = COM::createFromObject(com_Chart.Bars()); com_Bars = var_Bars; var_Bar2 = COM::createFromObject(com_Bars).Copy("Progress","TProgressU"); com_Bar2 = var_Bar2; com_Bar2.Def(4/*exBarHAlignCaption*/,COMVariant::createFromInt(18)); com_Bar2.Shape(18/*exShapeThinUp*/); var_Items = exg2antt1.Items(); com_Items = var_Items; h = com_Items.AddItem("Task"); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("9/25/2006",213)),COMVariant::createFromDate(str2Date("9/30/2006",213)),"T1"); com_Items.AddBar(h,"TProgressU",COMVariant::createFromDate(str2Date("9/25/2006",213)),COMVariant::createFromDate(str2Date("10/4/2006",213)),"TP1"); com_Items.GroupBars(h,"T1",true,h,"TP1",true,COMVariant::createFromInt(3)); com_Items.ItemBar(h,"TP1",3/*exBarCaption*/,"<font ;6>progress up"); h = com_Items.AddItem("Task"); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("9/26/2006",213)),COMVariant::createFromDate(str2Date("10/1/2006",213)),"T2"); com_Items.AddBar(h,"TProgressC",COMVariant::createFromDate(str2Date("9/26/2006",213)),COMVariant::createFromDate(str2Date("10/5/2006",213)),"TP2"); com_Items.GroupBars(h,"T2",true,h,"TP2",true,COMVariant::createFromInt(3)); com_Items.ItemBar(h,"TP2",3/*exBarCaption*/,"<font ;6>progress center"); h = com_Items.AddItem("Task"); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("9/25/2006",213)),COMVariant::createFromDate(str2Date("9/30/2006",213)),"T3"); com_Items.AddBar(h,"TProgressD",COMVariant::createFromDate(str2Date("9/25/2006",213)),COMVariant::createFromDate(str2Date("10/6/2006",213)),"TP3"); com_Items.GroupBars(h,"T3",true,h,"TP3",true,COMVariant::createFromInt(3)); com_Items.ItemBar(h,"TP3",3/*exBarCaption*/,"<font ;6>progress down"); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(0,64); } */ |
1781 |
I have a column of date-type, the question is how can I move the associated bar, instead of resizing it (summary, inclusive, working)
public void init() { COM com_Bar,com_Bar1,com_Bars,com_Chart,com_Column,com_Column1,com_Columns,com_Editor,com_Items; anytype var_Bar,var_Bar1,var_Bars,var_Chart,var_Column,var_Column1,var_Columns,var_Editor,var_Items; int h,h1,h2,h3; ; super(); exg2antt1.BeginUpdate(); exg2antt1.MarkSearchColumn(false); exg2antt1.Indent(11); exg2antt1.HasLines(1/*exSolidLine*/); exg2antt1.Items().AllowCellValueToItemBar(true); var_Columns = exg2antt1.Columns(); com_Columns = var_Columns; com_Columns.Add("Tasks"); var_Column = COM::createFromVariant(com_Columns.Add("Start")); com_Column = var_Column; com_Column.Def(18/*exCellValueToItemBarProperty*/,COMVariant::createFromInt(544)); var_Editor = COM::createFromObject(com_Column.Editor()); com_Editor = var_Editor; com_Editor.EditType(7/*DateType*/); com_Column.LevelKey(COMVariant::createFromInt(1)); var_Column1 = COM::createFromVariant(com_Columns.Add("End")); com_Column1 = var_Column1; com_Column1.Def(18/*exCellValueToItemBarProperty*/,COMVariant::createFromInt(546)); var_Editor = COM::createFromObject(com_Column1.Editor()); com_Editor = var_Editor; com_Editor.EditType(7/*DateType*/); com_Column1.LevelKey(COMVariant::createFromInt(1)); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("9/20/2006",213))); com_Chart.AllowLinkBars(false); com_Chart.AllowCreateBar(0/*exNoCreateBar*/); com_Chart.LevelCount(2); /*should be called during the form's activate method*/ com_Chart.PaneWidth(0,224); var_Bars = com_Chart.Bars(); com_Bars = var_Bars; var_Bar = com_Bars.Add("Underline"); com_Bar = var_Bar; com_Bar.Color(WinApi::RGB2int(0,0,255)); com_Bar.Shape(20/*exShapeThinDown*/); var_Bar1 = com_Bars.Add("Task:Underline"); com_Bar1 = var_Bar1; com_Bar1.Shortcut("T"); com_Bar1.Def(20/*exBarKeepWorkingCount*/,COMVariant::createFromBoolean(true)); var_Items = exg2antt1.Items(); com_Items = var_Items; h = com_Items.AddItem("Project"); com_Items.AddBar(h,"Summary",COMVariant::createFromDate(str2Date("9/21/2006",213)),COMVariant::createFromDate(str2Date("10/3/2006",213))); h1 = com_Items.InsertItem(h,,"Task 1"); com_Items.AddBar(h1,"T",COMVariant::createFromDate(str2Date("9/21/2006",213)),COMVariant::createFromDate(str2Date("9/24/2006",213))); h2 = com_Items.InsertItem(h,,"Task 2"); com_Items.AddBar(h2,"T",COMVariant::createFromDate(str2Date("9/24/2006",213)),COMVariant::createFromDate(str2Date("9/28/2006",213))); h3 = com_Items.InsertItem(h,,"Task 3"); com_Items.AddBar(h3,"T",COMVariant::createFromDate(str2Date("9/28/2006",213)),COMVariant::createFromDate(str2Date("10/3/2006",213))); com_Items.DefineSummaryBars(h,"",h1,""); com_Items.DefineSummaryBars(h,"",h2,""); com_Items.DefineSummaryBars(h,"",h3,""); com_Items.ExpandItem(h,true); com_Items.ItemBold(h,true); com_Items.ItemBar(h,"",544/*exBarMoveStart*/,COMVariant::createFromDate(str2Date("9/22/2006",213))); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(0,224); } */ |
1780 |
I have a column of date-type, the question is how can I move the associated bar, instead of resizing it (summary)
public void init() { COM com_Chart,com_Column,com_Column1,com_Columns,com_Editor,com_Items; anytype var_Chart,var_Column,var_Column1,var_Columns,var_Editor,var_Items; int h,h1,h2,h3; ; super(); exg2antt1.BeginUpdate(); exg2antt1.MarkSearchColumn(false); exg2antt1.Indent(11); exg2antt1.HasLines(1/*exSolidLine*/); exg2antt1.Items().AllowCellValueToItemBar(true); var_Columns = exg2antt1.Columns(); com_Columns = var_Columns; com_Columns.Add("Tasks"); var_Column = COM::createFromVariant(com_Columns.Add("Start")); com_Column = var_Column; com_Column.Def(18/*exCellValueToItemBarProperty*/,COMVariant::createFromInt(544)); var_Editor = COM::createFromObject(com_Column.Editor()); com_Editor = var_Editor; com_Editor.EditType(7/*DateType*/); com_Column.LevelKey(COMVariant::createFromInt(1)); var_Column1 = COM::createFromVariant(com_Columns.Add("End")); com_Column1 = var_Column1; com_Column1.Def(18/*exCellValueToItemBarProperty*/,COMVariant::createFromInt(545)); var_Editor = COM::createFromObject(com_Column1.Editor()); com_Editor = var_Editor; com_Editor.EditType(7/*DateType*/); com_Column1.LevelKey(COMVariant::createFromInt(1)); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("9/20/2006",213))); com_Chart.AllowLinkBars(false); com_Chart.AllowCreateBar(0/*exNoCreateBar*/); com_Chart.LevelCount(2); /*should be called during the form's activate method*/ com_Chart.PaneWidth(0,224); var_Items = exg2antt1.Items(); com_Items = var_Items; h = com_Items.AddItem("Project"); com_Items.AddBar(h,"Summary",COMVariant::createFromDate(str2Date("9/21/2006",213)),COMVariant::createFromDate(str2Date("10/3/2006",213))); h1 = com_Items.InsertItem(h,,"Task 1"); com_Items.AddBar(h1,"Task",COMVariant::createFromDate(str2Date("9/21/2006",213)),COMVariant::createFromDate(str2Date("9/24/2006",213))); h2 = com_Items.InsertItem(h,,"Task 2"); com_Items.AddBar(h2,"Task",COMVariant::createFromDate(str2Date("9/24/2006",213)),COMVariant::createFromDate(str2Date("9/28/2006",213))); h3 = com_Items.InsertItem(h,,"Task 3"); com_Items.AddBar(h3,"Task",COMVariant::createFromDate(str2Date("9/28/2006",213)),COMVariant::createFromDate(str2Date("10/3/2006",213))); com_Items.DefineSummaryBars(h,"",h1,""); com_Items.DefineSummaryBars(h,"",h2,""); com_Items.DefineSummaryBars(h,"",h3,""); com_Items.ExpandItem(h,true); com_Items.ItemBold(h,true); com_Items.ItemBar(h,"",544/*exBarMoveStart*/,COMVariant::createFromDate(str2Date("9/22/2006",213))); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(0,224); } */ |
1779 |
Is it possible to programmatically move all bars of specified key to end at specified date (inclusive)
public void init() { COM com_Chart,com_Items; anytype var_Chart,var_Items; ; super(); exg2antt1.BeginUpdate(); exg2antt1.Debug(true); exg2antt1.Columns().Add("Tasks"); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("1/1/2001",213))); com_Chart.LevelCount(2); /*should be called during the form's activate method*/ com_Chart.PaneWidth(false,48); var_Items = exg2antt1.Items(); com_Items = var_Items; com_Items.AddBar(com_Items.AddItem("Task A.1"),"Task",COMVariant::createFromDate(str2Date("1/1/2001",213)),COMVariant::createFromDate(str2Date("1/6/2001",213)),"A"); com_Items.AddBar(com_Items.AddItem("Task A.2"),"Task",COMVariant::createFromDate(str2Date("1/2/2001",213)),COMVariant::createFromDate(str2Date("1/7/2001",213)),"A"); com_Items.AddBar(com_Items.AddItem("Task B.1"),"Task",COMVariant::createFromDate(str2Date("1/3/2001",213)),COMVariant::createFromDate(str2Date("1/8/2001",213)),"B"); com_Items.AddBar(com_Items.AddItem("Task B.2"),"Task",COMVariant::createFromDate(str2Date("1/4/2001",213)),COMVariant::createFromDate(str2Date("1/9/2001",213)),"B"); com_Items.ItemBar(0,"<A*>",546/*exBarMoveEndInclusive*/,COMVariant::createFromDate(str2Date("1/2/2001",213))); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(false,48); } */ |
1778 |
Is it possible to programmatically move all bars to end at specified date (inclusive)
public void init() { COM com_Chart,com_Items; anytype var_Chart,var_Items; ; super(); exg2antt1.BeginUpdate(); exg2antt1.Debug(true); exg2antt1.Columns().Add("Tasks"); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("1/1/2001",213))); com_Chart.LevelCount(2); /*should be called during the form's activate method*/ com_Chart.PaneWidth(false,48); var_Items = exg2antt1.Items(); com_Items = var_Items; com_Items.AddBar(com_Items.AddItem("Task A.1"),"Task",COMVariant::createFromDate(str2Date("1/1/2001",213)),COMVariant::createFromDate(str2Date("1/6/2001",213)),"A"); com_Items.AddBar(com_Items.AddItem("Task A.2"),"Task",COMVariant::createFromDate(str2Date("1/2/2001",213)),COMVariant::createFromDate(str2Date("1/7/2001",213)),"A"); com_Items.AddBar(com_Items.AddItem("Task B.1"),"Task",COMVariant::createFromDate(str2Date("1/3/2001",213)),COMVariant::createFromDate(str2Date("1/8/2001",213)),"B"); com_Items.AddBar(com_Items.AddItem("Task B.2"),"Task",COMVariant::createFromDate(str2Date("1/4/2001",213)),COMVariant::createFromDate(str2Date("1/9/2001",213)),"B"); com_Items.ItemBar(0,"<*>",546/*exBarMoveEndInclusive*/,COMVariant::createFromDate(str2Date("1/2/2001",213))); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(false,48); } */ |
1777 |
Is it possible to programmatically move all bars of specified key to end at specified date
public void init() { COM com_Chart,com_Items; anytype var_Chart,var_Items; ; super(); exg2antt1.BeginUpdate(); exg2antt1.Debug(true); exg2antt1.Columns().Add("Tasks"); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("1/1/2001",213))); com_Chart.LevelCount(2); /*should be called during the form's activate method*/ com_Chart.PaneWidth(false,48); var_Items = exg2antt1.Items(); com_Items = var_Items; com_Items.AddBar(com_Items.AddItem("Task A.1"),"Task",COMVariant::createFromDate(str2Date("1/1/2001",213)),COMVariant::createFromDate(str2Date("1/6/2001",213)),"A"); com_Items.AddBar(com_Items.AddItem("Task A.2"),"Task",COMVariant::createFromDate(str2Date("1/2/2001",213)),COMVariant::createFromDate(str2Date("1/7/2001",213)),"A"); com_Items.AddBar(com_Items.AddItem("Task B.1"),"Task",COMVariant::createFromDate(str2Date("1/3/2001",213)),COMVariant::createFromDate(str2Date("1/8/2001",213)),"B"); com_Items.AddBar(com_Items.AddItem("Task B.2"),"Task",COMVariant::createFromDate(str2Date("1/4/2001",213)),COMVariant::createFromDate(str2Date("1/9/2001",213)),"B"); com_Items.ItemBar(0,"<A*>",545/*exBarMoveEnd*/,COMVariant::createFromDate(str2Date("1/2/2001",213))); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(false,48); } */ |
1776 |
Is it possible to programmatically move all bars to end at specified date
public void init() { COM com_Chart,com_Items; anytype var_Chart,var_Items; ; super(); exg2antt1.BeginUpdate(); exg2antt1.Debug(true); exg2antt1.Columns().Add("Tasks"); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("1/1/2001",213))); com_Chart.LevelCount(2); /*should be called during the form's activate method*/ com_Chart.PaneWidth(false,48); var_Items = exg2antt1.Items(); com_Items = var_Items; com_Items.AddBar(com_Items.AddItem("Task A.1"),"Task",COMVariant::createFromDate(str2Date("1/1/2001",213)),COMVariant::createFromDate(str2Date("1/6/2001",213)),"A"); com_Items.AddBar(com_Items.AddItem("Task A.2"),"Task",COMVariant::createFromDate(str2Date("1/2/2001",213)),COMVariant::createFromDate(str2Date("1/7/2001",213)),"A"); com_Items.AddBar(com_Items.AddItem("Task B.1"),"Task",COMVariant::createFromDate(str2Date("1/3/2001",213)),COMVariant::createFromDate(str2Date("1/8/2001",213)),"B"); com_Items.AddBar(com_Items.AddItem("Task B.2"),"Task",COMVariant::createFromDate(str2Date("1/4/2001",213)),COMVariant::createFromDate(str2Date("1/9/2001",213)),"B"); com_Items.ItemBar(0,"<*>",545/*exBarMoveEnd*/,COMVariant::createFromDate(str2Date("1/2/2001",213))); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(false,48); } */ |
1775 |
Is it possible to programmatically move all bars of specified key to start at specified date
public void init() { COM com_Chart,com_Items; anytype var_Chart,var_Items; ; super(); exg2antt1.BeginUpdate(); exg2antt1.Debug(true); exg2antt1.Columns().Add("Tasks"); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("1/1/2001",213))); com_Chart.LevelCount(2); /*should be called during the form's activate method*/ com_Chart.PaneWidth(false,48); var_Items = exg2antt1.Items(); com_Items = var_Items; com_Items.AddBar(com_Items.AddItem("Task A.1"),"Task",COMVariant::createFromDate(str2Date("1/1/2001",213)),COMVariant::createFromDate(str2Date("1/6/2001",213)),"A"); com_Items.AddBar(com_Items.AddItem("Task A.2"),"Task",COMVariant::createFromDate(str2Date("1/2/2001",213)),COMVariant::createFromDate(str2Date("1/7/2001",213)),"A"); com_Items.AddBar(com_Items.AddItem("Task B.1"),"Task",COMVariant::createFromDate(str2Date("1/3/2001",213)),COMVariant::createFromDate(str2Date("1/8/2001",213)),"B"); com_Items.AddBar(com_Items.AddItem("Task B.2"),"Task",COMVariant::createFromDate(str2Date("1/4/2001",213)),COMVariant::createFromDate(str2Date("1/9/2001",213)),"B"); com_Items.ItemBar(0,"<A*>",544/*exBarMoveStart*/,COMVariant::createFromDate(str2Date("1/2/2001",213))); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(false,48); } */ |
1774 |
Is it possible to programmatically move all bars to start at specified date
public void init() { COM com_Chart,com_Items; anytype var_Chart,var_Items; ; super(); exg2antt1.BeginUpdate(); exg2antt1.Debug(true); exg2antt1.Columns().Add("Tasks"); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("1/1/2001",213))); com_Chart.LevelCount(2); /*should be called during the form's activate method*/ com_Chart.PaneWidth(false,48); var_Items = exg2antt1.Items(); com_Items = var_Items; com_Items.AddBar(com_Items.AddItem("Task A.1"),"Task",COMVariant::createFromDate(str2Date("1/1/2001",213)),COMVariant::createFromDate(str2Date("1/6/2001",213)),"A"); com_Items.AddBar(com_Items.AddItem("Task A.2"),"Task",COMVariant::createFromDate(str2Date("1/2/2001",213)),COMVariant::createFromDate(str2Date("1/7/2001",213)),"A"); com_Items.AddBar(com_Items.AddItem("Task B.1"),"Task",COMVariant::createFromDate(str2Date("1/3/2001",213)),COMVariant::createFromDate(str2Date("1/8/2001",213)),"B"); com_Items.AddBar(com_Items.AddItem("Task B.2"),"Task",COMVariant::createFromDate(str2Date("1/4/2001",213)),COMVariant::createFromDate(str2Date("1/9/2001",213)),"B"); com_Items.ItemBar(0,"<*>",544/*exBarMoveStart*/,COMVariant::createFromDate(str2Date("1/2/2001",213))); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(false,48); } */ |
1773 |
Is it possible to programmatically move all bars of specified key
public void init() { COM com_Chart,com_Items; anytype var_Chart,var_Items; ; super(); exg2antt1.BeginUpdate(); exg2antt1.Debug(true); exg2antt1.Columns().Add("Tasks"); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("1/1/2001",213))); com_Chart.LevelCount(2); /*should be called during the form's activate method*/ com_Chart.PaneWidth(false,48); var_Items = exg2antt1.Items(); com_Items = var_Items; com_Items.AddBar(com_Items.AddItem("Task A.1"),"Task",COMVariant::createFromDate(str2Date("1/1/2001",213)),COMVariant::createFromDate(str2Date("1/6/2001",213)),"A"); com_Items.AddBar(com_Items.AddItem("Task A.2"),"Task",COMVariant::createFromDate(str2Date("1/2/2001",213)),COMVariant::createFromDate(str2Date("1/7/2001",213)),"A"); com_Items.AddBar(com_Items.AddItem("Task B.1"),"Task",COMVariant::createFromDate(str2Date("1/3/2001",213)),COMVariant::createFromDate(str2Date("1/8/2001",213)),"B"); com_Items.AddBar(com_Items.AddItem("Task B.2"),"Task",COMVariant::createFromDate(str2Date("1/4/2001",213)),COMVariant::createFromDate(str2Date("1/9/2001",213)),"B"); com_Items.ItemBar(0,"<A*>",514/*exBarMove*/,COMVariant::createFromInt(2)); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(false,48); } */ |
1772 |
Is it possible to programmatically move all bars
public void init() { COM com_Chart,com_Items; anytype var_Chart,var_Items; ; super(); exg2antt1.BeginUpdate(); exg2antt1.Debug(true); exg2antt1.Columns().Add("Tasks"); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("1/1/2001",213))); com_Chart.LevelCount(2); /*should be called during the form's activate method*/ com_Chart.PaneWidth(false,48); var_Items = exg2antt1.Items(); com_Items = var_Items; com_Items.AddBar(com_Items.AddItem("Task A.1"),"Task",COMVariant::createFromDate(str2Date("1/1/2001",213)),COMVariant::createFromDate(str2Date("1/6/2001",213)),"A"); com_Items.AddBar(com_Items.AddItem("Task A.2"),"Task",COMVariant::createFromDate(str2Date("1/2/2001",213)),COMVariant::createFromDate(str2Date("1/7/2001",213)),"A"); com_Items.AddBar(com_Items.AddItem("Task B.1"),"Task",COMVariant::createFromDate(str2Date("1/3/2001",213)),COMVariant::createFromDate(str2Date("1/8/2001",213)),"B"); com_Items.AddBar(com_Items.AddItem("Task B.2"),"Task",COMVariant::createFromDate(str2Date("1/4/2001",213)),COMVariant::createFromDate(str2Date("1/9/2001",213)),"B"); com_Items.ItemBar(0,"<*>",514/*exBarMove*/,COMVariant::createFromInt(2)); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(false,48); } */ |
1771 |
How can I programmatically move a bar, so it ends at specified date (inclusive)
public void init() { COM com_Chart,com_Items; anytype var_Chart,var_Items; int h; ; super(); exg2antt1.Columns().Add("Tasks"); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("1/1/2001",213))); com_Chart.LevelCount(2); /*should be called during the form's activate method*/ com_Chart.PaneWidth(false,48); var_Items = exg2antt1.Items(); com_Items = var_Items; h = com_Items.AddItem("Task 1"); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("1/1/2001",213)),COMVariant::createFromDate(str2Date("1/6/2001",213)),"A"); com_Items.ItemBar(h,"A",546/*exBarMoveEndInclusive*/,COMVariant::createFromDate(str2Date("1/4/2001",213))); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(false,48); } */ |
1770 |
How can I programmatically move a bar, so it ends at specified date
public void init() { COM com_Chart,com_Items; anytype var_Chart,var_Items; int h; ; super(); exg2antt1.Columns().Add("Tasks"); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("1/1/2001",213))); com_Chart.LevelCount(2); /*should be called during the form's activate method*/ com_Chart.PaneWidth(false,48); var_Items = exg2antt1.Items(); com_Items = var_Items; h = com_Items.AddItem("Task 1"); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("1/1/2001",213)),COMVariant::createFromDate(str2Date("1/6/2001",213)),"A"); com_Items.ItemBar(h,"A",545/*exBarMoveEnd*/,COMVariant::createFromDate(str2Date("1/4/2001",213))); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(false,48); } */ |
1769 |
How can I programmatically move a bar, so it starts at specified date
public void init() { COM com_Chart,com_Items; anytype var_Chart,var_Items; int h; ; super(); exg2antt1.Columns().Add("Tasks"); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("1/1/2001",213))); com_Chart.LevelCount(2); /*should be called during the form's activate method*/ com_Chart.PaneWidth(false,48); var_Items = exg2antt1.Items(); com_Items = var_Items; h = com_Items.AddItem("Task 1"); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("1/1/2001",213)),COMVariant::createFromDate(str2Date("1/6/2001",213)),"A"); com_Items.ItemBar(h,"A",544/*exBarMoveStart*/,COMVariant::createFromDate(str2Date("1/4/2001",213))); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(false,48); } */ |
1768 |
I can’t figure out how to control the date and time format (in level 0, 1 and 2) when the user click on the OverviewZoom bottom
public void init() { COM com_Chart,com_Level,com_Level1; anytype var_Chart,var_Level,var_Level1; str var_s; ; super(); exg2antt1.BeginUpdate(); exg2antt1.HeaderHeight(22); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("1/1/2016",213))); /*should be called during the form's activate method*/ com_Chart.PaneWidth(false,0); com_Chart.LevelCount(2); com_Chart.DrawLevelSeparator(2/*exLevelSolidLine*/); com_Chart.AllowResizeChart(6/*exAllowResizeChartMiddle | exAllowResizeChartHeader*/); com_Chart.MaxUnitWidth(196); var_Level = com_Chart.Level(0); com_Level = var_Level; com_Level.Alignment(17/*exHOutside | CenterAlignment*/); com_Level.DrawTickLines(2/*exLevelSolidLine*/); var_Level1 = com_Chart.Level(1); com_Level1 = var_Level1; com_Level1.DrawTickLines(65/*exLevelMiddleLine | exLevelDotLine*/); com_Level1.DrawTickLinesFrom(0,2/*exLevelSolidLine*/); com_Level1.BackColor(WinApi::RGB2int(240,240,240)); com_Chart.OverviewVisible(2/*exOverviewShowAllVisible*/); com_Chart.AllowOverviewZoom(1/*exAlwaysZoom*/); com_Chart.UnitWidth(24); com_Chart.Label(16777216/*exSecond*/,""); com_Chart.Label(1048576/*exMinute*/,""); com_Chart.Label(65536/*exHour*/,""); com_Chart.Label(256/*exWeek*/,""); var_s = "<font ;6><%d%><|><%d%><|><%d%> <fgcolor=A0A0A0><off -4><%d1%><|><%d%> <fgcolor=A0A0A0><off -4><%d2%><|><%d%> <fgcolor=A0A0A0><of"; var_s = var_s + "f -4><%d3%><|><%d%> <fgcolor=A0A0A0><off -4><%dddd%><||><||>4096"; com_Chart.Label(4096/*exDay*/,var_s); com_Chart.UnitScale(4096/*exDay*/); com_Chart.ScrollTo(com_Chart.FirstVisibleDate(),COMVariant::createFromInt(1)); exg2antt1.Columns().Add("Default"); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(false,0); } */ |
1767 |
Can I use GroupBars with OverlaidType method
public void init() { COM com_Bar,com_Chart,com_Items; anytype var_Bar,var_Chart,var_Items; int h,h1; str h2,h3; ; super(); exg2antt1.BeginUpdate(); exg2antt1.Columns().Add("Tasks"); exg2antt1.Debug(true); exg2antt1.LinesAtRoot(-1/*exLinesAtRoot*/); exg2antt1.ScrollBySingleLine(true); exg2antt1.BackColorLevelHeader(exg2antt1.BackColor()); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; com_Chart.LevelCount(2); com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("9/20/2006",213))); /*should be called during the form's activate method*/ com_Chart.PaneWidth(0,96); var_Bar = COM::createFromObject(com_Chart.Bars()).Item("Task"); com_Bar = var_Bar; com_Bar.OverlaidType(3/*exOverlaidBarsStack*/); var_Items = exg2antt1.Items(); com_Items = var_Items; h = com_Items.AddItem("Project"); com_Items.AddBar(h,"Summary",COMVariant::createFromDate(str2Date("9/21/2006",213)),COMVariant::createFromDate(str2Date("10/4/2006",213))); h1 = com_Items.InsertItem(h,,"Tasks"); com_Items.AddBar(h1,"Task",COMVariant::createFromDate(str2Date("9/21/2006",213)),COMVariant::createFromDate(str2Date("9/26/2006",213)),"h1"); h2 = h1; com_Items.AddBar(h2,"Task",COMVariant::createFromDate(str2Date("9/25/2006",213)),COMVariant::createFromDate(str2Date("9/30/2006",213)),"h2"); com_Items.AddLink("L1",h1,"h1",h2,"h2"); h3 = h1; com_Items.AddBar(h3,"Task",COMVariant::createFromDate(str2Date("9/29/2006",213)),COMVariant::createFromDate(str2Date("10/4/2006",213)),"h3"); com_Items.AddLink("L2",h2,"h2",h3,"h3"); com_Items.DefineSummaryBars(h,"",h1,"h1"); com_Items.DefineSummaryBars(h,"",h2,"h2"); com_Items.DefineSummaryBars(h,"",h3,"h3"); com_Items.ExpandItem(h,true); com_Items.ItemBold(h,true); com_Items.GroupBars(h1,"h1",false,h2,"h2",true,COMVariant::createFromInt(31),"0;5;-1"); com_Items.GroupBars(h2,"h2",false,h3,"h3",true,COMVariant::createFromInt(31),"0;5;-1"); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(0,96); } */ |
1766 |
How do I change the link's lag so I can schedule bars to start later (with nonworking part)
// BarResizing event - Occurs when a bar is moving or resizing. void onEvent_BarResizing(int _Item,COMVariant _Key) { ; exg2antt1.Items().SchedulePDM(_Item,_Key); } public void init() { COM com_Bar,com_Chart,com_Items; anytype var_Bar,var_Chart,var_Items; int h1,h2,h3,h4; ; super(); exg2antt1.BeginUpdate(); exg2antt1.DefaultItemHeight(22); exg2antt1.HeaderHeight(exg2antt1.DefaultItemHeight()); exg2antt1.BackColorLevelHeader(exg2antt1.BackColor()); exg2antt1.AntiAliasing(true); exg2antt1.Columns().Add("Task"); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; com_Chart.LinksStyle(0/*exLinkSolid*/); com_Chart.LinksColor(WinApi::RGB2int(128,128,128)); com_Chart.LevelCount(2); com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("12/28/2000",213))); /*should be called during the form's activate method*/ com_Chart.PaneWidth(false,48); var_Bar = COM::createFromObject(com_Chart.Bars()).Item("Task"); com_Bar = var_Bar; com_Bar.Def(20/*exBarKeepWorkingCount*/,COMVariant::createFromBoolean(true)); com_Bar.Def(4/*exBarHAlignCaption*/,COMVariant::createFromInt(18)); com_Bar.Color(WinApi::RGB2int(0,0,0)); com_Bar.StartColor(WinApi::RGB2int(190,190,190)); com_Bar.EndColor(com_Bar.StartColor()); com_Bar.Pattern(32/*exPatternBox*/); var_Items = exg2antt1.Items(); com_Items = var_Items; h1 = com_Items.AddItem("Task 1"); com_Items.AddBar(h1,"Task",COMVariant::createFromDate(str2Date("1/2/2001",213)),COMVariant::createFromDate(str2Date("1/5/2001",213)),"K1","FS lag=0 (default)"); h2 = com_Items.AddItem("Task 2"); com_Items.AddBar(h2,"Task",COMVariant::createFromDate(str2Date("1/2/2001",213)),COMVariant::createFromDate(str2Date("1/5/2001",213)),"K2","FS lag=4"); com_Items.AddLink("L1",h1,"K1",h2,"K2"); h3 = com_Items.AddItem("Task 3"); com_Items.AddBar(h3,"Task",COMVariant::createFromDate(str2Date("1/2/2001",213)),COMVariant::createFromDate(str2Date("1/5/2001",213)),"K3","FS lag=-1"); com_Items.AddLink("L2",h2,"K2",h3,"K3"); com_Items.Link("L2",16/*exLinkPDMWorkingDelay*/,COMVariant::createFromInt(4)); h4 = com_Items.AddItem("Task 4"); com_Items.AddBar(h4,"Task",COMVariant::createFromDate(str2Date("1/2/2001",213)),COMVariant::createFromDate(str2Date("1/5/2001",213)),"K4"); com_Items.AddLink("L3",h3,"K3",h4,"K4"); com_Items.Link("L3",16/*exLinkPDMWorkingDelay*/,COMVariant::createFromInt(-1)); com_Items.SchedulePDM(0,"K1"); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(false,48); } */ |
1765 |
How do I change the link's lag so I can schedule bars to start later (without nonworking part)
// BarResizing event - Occurs when a bar is moving or resizing. void onEvent_BarResizing(int _Item,COMVariant _Key) { ; exg2antt1.Items().SchedulePDM(_Item,_Key); } public void init() { COM com_Bar,com_Chart,com_Items; anytype var_Bar,var_Chart,var_Items; int h1,h2,h3,h4; ; super(); exg2antt1.BeginUpdate(); exg2antt1.DefaultItemHeight(22); exg2antt1.HeaderHeight(exg2antt1.DefaultItemHeight()); exg2antt1.BackColorLevelHeader(exg2antt1.BackColor()); exg2antt1.AntiAliasing(true); exg2antt1.Columns().Add("Task"); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; com_Chart.LinksStyle(0/*exLinkSolid*/); com_Chart.LinksColor(WinApi::RGB2int(128,128,128)); com_Chart.LevelCount(2); com_Chart.NonworkingDays(0); com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("12/28/2000",213))); /*should be called during the form's activate method*/ com_Chart.PaneWidth(false,48); var_Bar = COM::createFromObject(com_Chart.Bars()).Item("Task"); com_Bar = var_Bar; com_Bar.Def(4/*exBarHAlignCaption*/,COMVariant::createFromInt(18)); com_Bar.Color(WinApi::RGB2int(0,0,0)); com_Bar.StartColor(WinApi::RGB2int(190,190,190)); com_Bar.EndColor(com_Bar.StartColor()); com_Bar.Pattern(32/*exPatternBox*/); var_Items = exg2antt1.Items(); com_Items = var_Items; h1 = com_Items.AddItem("Task 1"); com_Items.AddBar(h1,"Task",COMVariant::createFromDate(str2Date("1/2/2001",213)),COMVariant::createFromDate(str2Date("1/5/2001",213)),"K1","FS lag=0 (default)"); h2 = com_Items.AddItem("Task 2"); com_Items.AddBar(h2,"Task",COMVariant::createFromDate(str2Date("1/2/2001",213)),COMVariant::createFromDate(str2Date("1/5/2001",213)),"K2","FS lag=4"); com_Items.AddLink("L1",h1,"K1",h2,"K2"); h3 = com_Items.AddItem("Task 3"); com_Items.AddBar(h3,"Task",COMVariant::createFromDate(str2Date("1/2/2001",213)),COMVariant::createFromDate(str2Date("1/5/2001",213)),"K3","FS lag=-1"); com_Items.AddLink("L2",h2,"K2",h3,"K3"); com_Items.Link("L2",17/*exLinkPDMDelay*/,COMVariant::createFromInt(4)); h4 = com_Items.AddItem("Task 4"); com_Items.AddBar(h4,"Task",COMVariant::createFromDate(str2Date("1/2/2001",213)),COMVariant::createFromDate(str2Date("1/5/2001",213)),"K4"); com_Items.AddLink("L3",h3,"K3",h4,"K4"); com_Items.Link("L3",17/*exLinkPDMDelay*/,COMVariant::createFromInt(-1)); com_Items.SchedulePDM(0,"K1"); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(false,48); } */ |
1764 |
Is it possible to select the entire row/line, when user clicks the first column, and select individually the rest of cells, while user clicks any other column
// AddGroupItem event - Occurs after a new Group Item has been inserted to Items collection. void onEvent_AddGroupItem(int _Item) { COM com_Items; anytype var_Items; ; var_Items = exg2antt1.Items(); com_Items = var_Items; com_Items.AddBar(_Item,"Summary",com_Items.CellValue(_Item,COMVariant::createFromInt(2)),com_Items.CellValue(_Item,COMVariant::createFromInt(4))); com_Items.DefineSummaryBars(_Item,"",-3,""); } // AddItem event - Occurs after a new Item has been inserted to Items collection. void onEvent_AddItem(int _Item) { COM com_Items; anytype var_Items; ; var_Items = exg2antt1.Items(); com_Items = var_Items; com_Items.AddBar(_Item,"Task",com_Items.CellValue(_Item,COMVariant::createFromInt(2)),com_Items.CellValue(_Item,COMVariant::createFromInt(4))); } // MouseDown event - Occurs when the user presses a mouse button. void onEvent_MouseDown(int _Button,int _Shift,int _X,int _Y) { int i; ; i = exg2antt1.ItemFromPoint(-1,-1,c,hit); exg2antt1.FullRowSelect(exg2antt1.Columns().Item(c).Data()); } public void init() { COM com_Column,com_rs; anytype rs,var_Column; int i; ; super(); exg2antt1.BeginUpdate(); exg2antt1.HeaderHeight(22); exg2antt1.HeaderAppearance(1/*Flat*/); exg2antt1.BackColorLock(WinApi::RGB2int(240,240,240)); exg2antt1.BackColorHeader(exg2antt1.BackColorLock()); exg2antt1.HasLines(0/*exNoLine*/); exg2antt1.ColumnAutoResize(false); exg2antt1.SortBarVisible(false); exg2antt1.AllowGroupBy(true); exg2antt1.ReadOnly(-1/*exReadOnly*/); exg2antt1.ShowFocusRect(false); exg2antt1.CountLockedColumns(1); exg2antt1.AutoDrag(16/*exAutoDragScroll*/); exg2antt1.SingleSort(false); exg2antt1.ColumnsAllowSizing(true); exg2antt1.DrawGridLines(-1/*exAllLines*/); exg2antt1.GridLineStyle(48/*exGridLinesSolid*/); exg2antt1.GridLineColor(WinApi::RGB2int(220,220,220)); exg2antt1.Chart().FirstVisibleDate(COMVariant::createFromDate(str2Date("9/1/1994",213))); exg2antt1.Chart().LevelCount(2); /*should be called during the form's activate method*/ exg2antt1.Chart().PaneWidth(false,256); exg2antt1.BackColorSortBar(exg2antt1.BackColor()); exg2antt1.ColumnAutoResize(false); // Add 'Microsoft ActiveX Data Objects 6.1 Library(msado15.dll)' reference to your project. rs = COM::createFromObject(new ADODB.Recordset()); com_rs = rs; rs.Open("Orders","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\\Program Files\\Exontrol\\ExG2antt\\Sample\\Access\\misc.accdb",3/*adOpenStatic*/,3/*adLockOptimistic*/); exg2antt1.DataSource(rs); var_Column = COM::createFromObject(exg2antt1.Columns()).Item(COMVariant::createFromInt(0)); com_Column = var_Column; com_Column.Data(COMVariant::createFromInt(-1)); exg2antt1.Layout("singlesort=\"C5:1\";multiplesort=\" C1:2\""); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(false,256); } */ |
1763 |
I've also hit a strange problem with the BeforeExpandItem event - the Cancel parameter is declared as const in Delphi when I believe it should be declared as var or out so I can use it to return OleVariant(True) to cancel the operation, or am I missing something, or how can I disable expanding / collapsing the items
// BeforeExpandItem event - Fired before an item is about to be expanded (collapsed). void onEvent_BeforeExpandItem(int _Item,COMVariant /*variant*/ _Cancel) { ; exg2antt1.EventParam(1,COMVariant::createFromBoolean(true)); } // Event event - Notifies the application once the control fires an event. void onEvent_Event(int _EventID) { ; print( exg2antt1.EventParam(-2) ); } public void init() { COM com_Items; anytype var_Items; int h; ; super(); exg2antt1.BeginUpdate(); exg2antt1.LinesAtRoot(-1/*exLinesAtRoot*/); exg2antt1.Columns().Add("Default"); var_Items = exg2antt1.Items(); com_Items = var_Items; h = com_Items.AddItem("Root A"); com_Items.InsertItem(h,,"Child 1"); com_Items.InsertItem(h,,"Child 2"); com_Items.ExpandItem(h,true); h = com_Items.AddItem("Root B"); com_Items.InsertItem(h,,"Child 1"); com_Items.InsertItem(h,,"Child 2"); com_Items.ExpandItem(h,true); exg2antt1.EndUpdate(); } |
1762 |
Is there any way I can get rid / hide of the vertical blue lines ( today, selected date )
public void init() { COM com_Chart; anytype var_Chart; ; super(); exg2antt1.BeginUpdate(); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; /*should be called during the form's activate method*/ com_Chart.PaneWidth(false,128); com_Chart.LevelCount(2); com_Chart.MarkSelectDateColor(com_Chart.BackColor()); com_Chart.MarkTodayColor(com_Chart.BackColor()); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(false,128); } */ |
1761 |
Is it possible to search for a bar through items only ( not including the locked items )
public void init() { COM com_Chart,com_Column,com_Items,com_Items1; anytype var_Chart,var_Column,var_Items,var_Items1; int h; ; super(); exg2antt1.BeginUpdate(); exg2antt1.Debug(true); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; /*should be called during the form's activate method*/ com_Chart.PaneWidth(false,128); com_Chart.LevelCount(2); com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("12/31/2015",213))); exg2antt1.BackColorAlternate(WinApi::RGB2int(250,250,250)); exg2antt1.ShowLockedItems(true); exg2antt1.Columns().Add("Column"); var_Column = COM::createFromVariant(exg2antt1.Columns().Add("Find")); com_Column = var_Column; com_Column.Def(17/*exCellValueFormat*/,COMVariant::createFromInt(1)); com_Column.Visible(false); com_Column.FormatColumn("int(value) = 0 ? `` : ` <fgcolor=FF0000><b>found here ` "); exg2antt1.Chart().ColumnsFormatLevel("1"); var_Items = exg2antt1.Items(); com_Items = var_Items; com_Items.LockedItemCount(0/*exTop*/,3); h = com_Items.LockedItem(0/*exTop*/,0); com_Items.CellValue(h,COMVariant::createFromInt(0),"locked-top 1"); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("1/4/2016",213)),COMVariant::createFromDate(str2Date("1/8/2016",213)),"T1"); h = com_Items.LockedItem(0/*exTop*/,1); com_Items.CellValue(h,COMVariant::createFromInt(0),"locked-top 2"); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("1/5/2016",213)),COMVariant::createFromDate(str2Date("1/9/2016",213)),"T2"); h = com_Items.LockedItem(0/*exTop*/,2); com_Items.SelectItem(h,false); com_Items.ItemDivider(h,0); com_Items.ItemHeight(h,2); com_Items.AddBar(com_Items.AddItem("un-locked item 1"),"Task",COMVariant::createFromDate(str2Date("1/4/2016",213)),COMVariant::createFromDate(str2Date("1/8/2016",213)),"T3"); com_Items.AddBar(com_Items.AddItem("un-locked item 2"),"Task",COMVariant::createFromDate(str2Date("1/5/2016",213)),COMVariant::createFromDate(str2Date("1/9/2016",213)),"T4"); com_Items.LockedItemCount(1/*exMiddle*/,3); h = com_Items.LockedItem(1/*exMiddle*/,0); com_Items.SelectItem(h,false); com_Items.ItemDivider(h,0); com_Items.ItemHeight(h,2); h = com_Items.LockedItem(1/*exMiddle*/,1); com_Items.CellValue(h,COMVariant::createFromInt(0),"locked-bottom 1"); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("1/4/2016",213)),COMVariant::createFromDate(str2Date("1/8/2016",213)),"T5"); h = com_Items.LockedItem(1/*exMiddle*/,2); com_Items.CellValue(h,COMVariant::createFromInt(0),"locked-bottom 2"); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("1/5/2016",213)),COMVariant::createFromDate(str2Date("1/9/2016",213)),"T6"); var_Items1 = exg2antt1.Items(); com_Items1 = var_Items1; h = com_Items1.FindBar("T4",COMVariant::createFromInt(0)); com_Items1.ItemBar(h,com_Items1.FirstItemBar(h),33/*exBarColor*/,COMVariant::createFromInt(255)); com_Items1.CellValue(h,COMVariant::createFromInt(1),h); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(false,128); } */ |
1760 |
Is it possible to search for a bar through bottom-locked-items only
public void init() { COM com_Chart,com_Column,com_Items,com_Items1; anytype var_Chart,var_Column,var_Items,var_Items1; int h; ; super(); exg2antt1.BeginUpdate(); exg2antt1.Debug(true); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; /*should be called during the form's activate method*/ com_Chart.PaneWidth(false,128); com_Chart.LevelCount(2); com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("12/31/2015",213))); exg2antt1.BackColorAlternate(WinApi::RGB2int(250,250,250)); exg2antt1.ShowLockedItems(true); exg2antt1.Columns().Add("Column"); var_Column = COM::createFromVariant(exg2antt1.Columns().Add("Find")); com_Column = var_Column; com_Column.Def(17/*exCellValueFormat*/,COMVariant::createFromInt(1)); com_Column.Visible(false); com_Column.FormatColumn("int(value) = 0 ? `` : ` <fgcolor=FF0000><b>found here ` "); exg2antt1.Chart().ColumnsFormatLevel("1"); var_Items = exg2antt1.Items(); com_Items = var_Items; com_Items.LockedItemCount(0/*exTop*/,3); h = com_Items.LockedItem(0/*exTop*/,0); com_Items.CellValue(h,COMVariant::createFromInt(0),"locked-top 1"); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("1/4/2016",213)),COMVariant::createFromDate(str2Date("1/8/2016",213)),"T1"); h = com_Items.LockedItem(0/*exTop*/,1); com_Items.CellValue(h,COMVariant::createFromInt(0),"locked-top 2"); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("1/5/2016",213)),COMVariant::createFromDate(str2Date("1/9/2016",213)),"T2"); h = com_Items.LockedItem(0/*exTop*/,2); com_Items.SelectItem(h,false); com_Items.ItemDivider(h,0); com_Items.ItemHeight(h,2); com_Items.AddBar(com_Items.AddItem("un-locked item 1"),"Task",COMVariant::createFromDate(str2Date("1/4/2016",213)),COMVariant::createFromDate(str2Date("1/8/2016",213)),"T3"); com_Items.AddBar(com_Items.AddItem("un-locked item 2"),"Task",COMVariant::createFromDate(str2Date("1/5/2016",213)),COMVariant::createFromDate(str2Date("1/9/2016",213)),"T4"); com_Items.LockedItemCount(1/*exMiddle*/,3); h = com_Items.LockedItem(1/*exMiddle*/,0); com_Items.SelectItem(h,false); com_Items.ItemDivider(h,0); com_Items.ItemHeight(h,2); h = com_Items.LockedItem(1/*exMiddle*/,1); com_Items.CellValue(h,COMVariant::createFromInt(0),"locked-bottom 1"); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("1/4/2016",213)),COMVariant::createFromDate(str2Date("1/8/2016",213)),"T5"); h = com_Items.LockedItem(1/*exMiddle*/,2); com_Items.CellValue(h,COMVariant::createFromInt(0),"locked-bottom 2"); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("1/5/2016",213)),COMVariant::createFromDate(str2Date("1/9/2016",213)),"T6"); var_Items1 = exg2antt1.Items(); com_Items1 = var_Items1; h = com_Items1.FindBar("T6",COMVariant::createFromInt(-4)); com_Items1.ItemBar(h,com_Items1.FirstItemBar(h),33/*exBarColor*/,COMVariant::createFromInt(255)); com_Items1.CellValue(h,COMVariant::createFromInt(1),h); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(false,128); } */ |
1759 |
Is it possible to search for a bar through top-locked-items only
public void init() { COM com_Chart,com_Column,com_Items,com_Items1; anytype var_Chart,var_Column,var_Items,var_Items1; int h; ; super(); exg2antt1.BeginUpdate(); exg2antt1.Debug(true); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; /*should be called during the form's activate method*/ com_Chart.PaneWidth(false,128); com_Chart.LevelCount(2); com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("12/31/2015",213))); exg2antt1.BackColorAlternate(WinApi::RGB2int(250,250,250)); exg2antt1.ShowLockedItems(true); exg2antt1.Columns().Add("Column"); var_Column = COM::createFromVariant(exg2antt1.Columns().Add("Find")); com_Column = var_Column; com_Column.Def(17/*exCellValueFormat*/,COMVariant::createFromInt(1)); com_Column.Visible(false); com_Column.FormatColumn("int(value) = 0 ? `` : ` <fgcolor=FF0000><b>found here ` "); exg2antt1.Chart().ColumnsFormatLevel("1"); var_Items = exg2antt1.Items(); com_Items = var_Items; com_Items.LockedItemCount(0/*exTop*/,3); h = com_Items.LockedItem(0/*exTop*/,0); com_Items.CellValue(h,COMVariant::createFromInt(0),"locked-top 1"); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("1/4/2016",213)),COMVariant::createFromDate(str2Date("1/8/2016",213)),"T1"); h = com_Items.LockedItem(0/*exTop*/,1); com_Items.CellValue(h,COMVariant::createFromInt(0),"locked-top 2"); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("1/5/2016",213)),COMVariant::createFromDate(str2Date("1/9/2016",213)),"T2"); h = com_Items.LockedItem(0/*exTop*/,2); com_Items.SelectItem(h,false); com_Items.ItemDivider(h,0); com_Items.ItemHeight(h,2); com_Items.AddBar(com_Items.AddItem("un-locked item 1"),"Task",COMVariant::createFromDate(str2Date("1/4/2016",213)),COMVariant::createFromDate(str2Date("1/8/2016",213)),"T3"); com_Items.AddBar(com_Items.AddItem("un-locked item 2"),"Task",COMVariant::createFromDate(str2Date("1/5/2016",213)),COMVariant::createFromDate(str2Date("1/9/2016",213)),"T4"); com_Items.LockedItemCount(1/*exMiddle*/,3); h = com_Items.LockedItem(1/*exMiddle*/,0); com_Items.SelectItem(h,false); com_Items.ItemDivider(h,0); com_Items.ItemHeight(h,2); h = com_Items.LockedItem(1/*exMiddle*/,1); com_Items.CellValue(h,COMVariant::createFromInt(0),"locked-bottom 1"); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("1/4/2016",213)),COMVariant::createFromDate(str2Date("1/8/2016",213)),"T5"); h = com_Items.LockedItem(1/*exMiddle*/,2); com_Items.CellValue(h,COMVariant::createFromInt(0),"locked-bottom 2"); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("1/5/2016",213)),COMVariant::createFromDate(str2Date("1/9/2016",213)),"T6"); var_Items1 = exg2antt1.Items(); com_Items1 = var_Items1; h = com_Items1.FindBar("T1",COMVariant::createFromInt(-3)); com_Items1.ItemBar(h,com_Items1.FirstItemBar(h),33/*exBarColor*/,COMVariant::createFromInt(255)); com_Items1.CellValue(h,COMVariant::createFromInt(1),h); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(false,128); } */ |
1758 |
Is it possible to search for a bar through all locked-items only
public void init() { COM com_Chart,com_Column,com_Items,com_Items1; anytype var_Chart,var_Column,var_Items,var_Items1; int h; ; super(); exg2antt1.BeginUpdate(); exg2antt1.Debug(true); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; /*should be called during the form's activate method*/ com_Chart.PaneWidth(false,128); com_Chart.LevelCount(2); com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("12/31/2015",213))); exg2antt1.BackColorAlternate(WinApi::RGB2int(250,250,250)); exg2antt1.ShowLockedItems(true); exg2antt1.Columns().Add("Column"); var_Column = COM::createFromVariant(exg2antt1.Columns().Add("Find")); com_Column = var_Column; com_Column.Def(17/*exCellValueFormat*/,COMVariant::createFromInt(1)); com_Column.Visible(false); com_Column.FormatColumn("int(value) = 0 ? `` : ` <fgcolor=FF0000><b>found here ` "); exg2antt1.Chart().ColumnsFormatLevel("1"); var_Items = exg2antt1.Items(); com_Items = var_Items; com_Items.LockedItemCount(0/*exTop*/,3); h = com_Items.LockedItem(0/*exTop*/,0); com_Items.CellValue(h,COMVariant::createFromInt(0),"locked-top 1"); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("1/4/2016",213)),COMVariant::createFromDate(str2Date("1/8/2016",213)),"T1"); h = com_Items.LockedItem(0/*exTop*/,1); com_Items.CellValue(h,COMVariant::createFromInt(0),"locked-top 2"); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("1/5/2016",213)),COMVariant::createFromDate(str2Date("1/9/2016",213)),"T2"); h = com_Items.LockedItem(0/*exTop*/,2); com_Items.SelectItem(h,false); com_Items.ItemDivider(h,0); com_Items.ItemHeight(h,2); com_Items.AddBar(com_Items.AddItem("un-locked item 1"),"Task",COMVariant::createFromDate(str2Date("1/4/2016",213)),COMVariant::createFromDate(str2Date("1/8/2016",213)),"T3"); com_Items.AddBar(com_Items.AddItem("un-locked item 2"),"Task",COMVariant::createFromDate(str2Date("1/5/2016",213)),COMVariant::createFromDate(str2Date("1/9/2016",213)),"T4"); com_Items.LockedItemCount(1/*exMiddle*/,3); h = com_Items.LockedItem(1/*exMiddle*/,0); com_Items.SelectItem(h,false); com_Items.ItemDivider(h,0); com_Items.ItemHeight(h,2); h = com_Items.LockedItem(1/*exMiddle*/,1); com_Items.CellValue(h,COMVariant::createFromInt(0),"locked-bottom 1"); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("1/4/2016",213)),COMVariant::createFromDate(str2Date("1/8/2016",213)),"T5"); h = com_Items.LockedItem(1/*exMiddle*/,2); com_Items.CellValue(h,COMVariant::createFromInt(0),"locked-bottom 2"); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("1/5/2016",213)),COMVariant::createFromDate(str2Date("1/9/2016",213)),"T6"); var_Items1 = exg2antt1.Items(); com_Items1 = var_Items1; h = com_Items1.FindBar("T2",COMVariant::createFromInt(-2)); com_Items1.ItemBar(h,com_Items1.FirstItemBar(h),33/*exBarColor*/,COMVariant::createFromInt(255)); com_Items1.CellValue(h,COMVariant::createFromInt(1),h); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(false,128); } */ |
1757 |
Is it possible to search for a bar through all items ( including locked items )
public void init() { COM com_Chart,com_Column,com_Items,com_Items1; anytype var_Chart,var_Column,var_Items,var_Items1; int h; ; super(); exg2antt1.BeginUpdate(); exg2antt1.Debug(true); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; /*should be called during the form's activate method*/ com_Chart.PaneWidth(false,128); com_Chart.LevelCount(2); com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("12/31/2015",213))); exg2antt1.BackColorAlternate(WinApi::RGB2int(250,250,250)); exg2antt1.ShowLockedItems(true); exg2antt1.Columns().Add("Column"); var_Column = COM::createFromVariant(exg2antt1.Columns().Add("Find")); com_Column = var_Column; com_Column.Def(17/*exCellValueFormat*/,COMVariant::createFromInt(1)); com_Column.Visible(false); com_Column.FormatColumn("int(value) = 0 ? `` : ` <fgcolor=FF0000><b>found here ` "); exg2antt1.Chart().ColumnsFormatLevel("1"); var_Items = exg2antt1.Items(); com_Items = var_Items; com_Items.LockedItemCount(0/*exTop*/,3); h = com_Items.LockedItem(0/*exTop*/,0); com_Items.CellValue(h,COMVariant::createFromInt(0),"locked-top 1"); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("1/4/2016",213)),COMVariant::createFromDate(str2Date("1/8/2016",213)),"T1"); h = com_Items.LockedItem(0/*exTop*/,1); com_Items.CellValue(h,COMVariant::createFromInt(0),"locked-top 2"); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("1/5/2016",213)),COMVariant::createFromDate(str2Date("1/9/2016",213)),"T2"); h = com_Items.LockedItem(0/*exTop*/,2); com_Items.SelectItem(h,false); com_Items.ItemDivider(h,0); com_Items.ItemHeight(h,2); com_Items.AddBar(com_Items.AddItem("un-locked item 1"),"Task",COMVariant::createFromDate(str2Date("1/4/2016",213)),COMVariant::createFromDate(str2Date("1/8/2016",213)),"T3"); com_Items.AddBar(com_Items.AddItem("un-locked item 2"),"Task",COMVariant::createFromDate(str2Date("1/5/2016",213)),COMVariant::createFromDate(str2Date("1/9/2016",213)),"T4"); com_Items.LockedItemCount(1/*exMiddle*/,3); h = com_Items.LockedItem(1/*exMiddle*/,0); com_Items.SelectItem(h,false); com_Items.ItemDivider(h,0); com_Items.ItemHeight(h,2); h = com_Items.LockedItem(1/*exMiddle*/,1); com_Items.CellValue(h,COMVariant::createFromInt(0),"locked-bottom 1"); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("1/4/2016",213)),COMVariant::createFromDate(str2Date("1/8/2016",213)),"T5"); h = com_Items.LockedItem(1/*exMiddle*/,2); com_Items.CellValue(h,COMVariant::createFromInt(0),"locked-bottom 2"); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("1/5/2016",213)),COMVariant::createFromDate(str2Date("1/9/2016",213)),"T6"); var_Items1 = exg2antt1.Items(); com_Items1 = var_Items1; h = com_Items1.FindBar("T5",COMVariant::createFromInt(-1)); com_Items1.ItemBar(h,com_Items1.FirstItemBar(h),33/*exBarColor*/,COMVariant::createFromInt(255)); com_Items1.CellValue(h,COMVariant::createFromInt(1),h); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(false,128); } */ |
1756 |
How do I clip/hide/align the bar's caption/text based on the bar's size/width/length
public void init() { COM com_Bar,com_Chart,com_Items; anytype var_Bar,var_Chart,var_Items; int h; ; super(); exg2antt1.BeginUpdate(); exg2antt1.Columns().Add("Clip"); exg2antt1.ScrollBySingleLine(true); exg2antt1.DrawGridLines(-2/*exRowLines*/); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; com_Chart.AllowResizeChart(6/*exAllowResizeChartMiddle | exAllowResizeChartHeader*/); com_Chart.DrawGridLines(-2/*exRowLines*/); com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("12/23/2000",213))); com_Chart.LevelCount(2); /*should be called during the form's activate method*/ com_Chart.PaneWidth(false,216); var_Bar = COM::createFromObject(com_Chart.Bars()).Item("Task"); com_Bar = var_Bar; com_Bar.Pattern(32/*exPatternBox*/); com_Bar.Color(WinApi::RGB2int(164,164,164)); com_Bar.StartColor(WinApi::RGB2int(240,240,240)); com_Bar.EndColor(com_Bar.StartColor()); com_Bar.OverlaidType(4611/*exOverlaidBarsIncludeCaption | exOverlaidBarsStackAutoArrange | exOverlaidBarsStack*/); com_Bar.Height(15); com_Chart.MinUnitWidth(com_Chart.UnitWidth()); var_Items = exg2antt1.Items(); com_Items = var_Items; h = com_Items.AddItem("no clip, (0-2)"); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("1/2/2001",213)),COMVariant::createFromDate(str2Date("1/4/2001",213)),"K1","no clip, right(<b>2</b>)"); com_Items.ItemBar(h,"K1",4/*exBarHAlignCaption*/,COMVariant::createFromInt(2)); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("1/2/2001",213)),COMVariant::createFromDate(str2Date("1/4/2001",213)),"K2","no clip, center(<b>1</b>)"); com_Items.ItemBar(h,"K2",4/*exBarHAlignCaption*/,COMVariant::createFromInt(1)); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("1/2/2001",213)),COMVariant::createFromDate(str2Date("1/4/2001",213)),"K3","no clip, left(<b>0</b>)"); com_Items.ItemBar(h,"K3",4/*exBarHAlignCaption*/,COMVariant::createFromInt(0)); h = com_Items.AddItem("clip, inside (3-5)"); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("12/28/2000",213)),COMVariant::createFromDate(str2Date("1/8/2001",213)),"K1","clip, inside, right(<b>5</b>)"); com_Items.ItemBar(h,"K1",4/*exBarHAlignCaption*/,COMVariant::createFromInt(5)); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("12/28/2000",213)),COMVariant::createFromDate(str2Date("1/8/2001",213)),"K2","clip, inside, center(<b>4</b>)"); com_Items.ItemBar(h,"K2",4/*exBarHAlignCaption*/,COMVariant::createFromInt(4)); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("12/28/2000",213)),COMVariant::createFromDate(str2Date("1/8/2001",213)),"K3","clip, inside, left(<b>3</b>)"); com_Items.ItemBar(h,"K3",4/*exBarHAlignCaption*/,COMVariant::createFromInt(3)); h = com_Items.AddItem("hide on min width, clip if not fit, inside (6-8)"); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("12/26/2000",213)),COMVariant::createFromDate(str2Date("1/10/2001",213)),"K1","hide on min width, clip if not fit, inside, right(<b>8</b>)"); com_Items.ItemBar(h,"K1",4/*exBarHAlignCaption*/,COMVariant::createFromInt(8)); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("12/26/2000",213)),COMVariant::createFromDate(str2Date("1/10/2001",213)),"K2","hide on min width, clip if not fit, inside, center(<b>7</b>)"); com_Items.ItemBar(h,"K2",4/*exBarHAlignCaption*/,COMVariant::createFromInt(7)); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("12/26/2000",213)),COMVariant::createFromDate(str2Date("1/10/2001",213)),"K3","hide on min width, clip if not fit, inside, left(<b>6</b>)"); com_Items.ItemBar(h,"K3",4/*exBarHAlignCaption*/,COMVariant::createFromInt(6)); h = com_Items.AddItem("hide if not fit, no clip, inside (9-11)"); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("12/28/2000",213)),COMVariant::createFromDate(str2Date("1/8/2001",213)),"K1","hide if not fit, no clip, inside, right(<b>11</b>)"); com_Items.ItemBar(h,"K1",4/*exBarHAlignCaption*/,COMVariant::createFromInt(11)); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("12/28/2000",213)),COMVariant::createFromDate(str2Date("1/8/2001",213)),"K2","hide if not fit, no clip, center(<b>10</b>)"); com_Items.ItemBar(h,"K2",4/*exBarHAlignCaption*/,COMVariant::createFromInt(10)); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("12/28/2000",213)),COMVariant::createFromDate(str2Date("1/8/2001",213)),"K3","hide if not fit, no clip, inside, left(<b>9</b>)"); com_Items.ItemBar(h,"K3",4/*exBarHAlignCaption*/,COMVariant::createFromInt(9)); h = com_Items.AddItem("no clip, inside, outside (12-14)"); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("12/28/2000",213)),COMVariant::createFromDate(str2Date("1/8/2001",213)),"K1","no clip, inside, outside, right(<b>14</b>)"); com_Items.ItemBar(h,"K1",4/*exBarHAlignCaption*/,COMVariant::createFromInt(14)); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("12/28/2000",213)),COMVariant::createFromDate(str2Date("1/8/2001",213)),"K2","no clip, inside, outside, center(<b>13</b>)"); com_Items.ItemBar(h,"K2",4/*exBarHAlignCaption*/,COMVariant::createFromInt(13)); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("12/28/2000",213)),COMVariant::createFromDate(str2Date("1/8/2001",213)),"K3","no clip, inside, outside, left(<b>12</b>)"); com_Items.ItemBar(h,"K3",4/*exBarHAlignCaption*/,COMVariant::createFromInt(12)); h = com_Items.AddItem("no clip, outside (16-18)"); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("12/30/2000",213)),COMVariant::createFromDate(str2Date("1/6/2001",213)),"K1","no clip, outside, right(<b>18</b>)"); com_Items.ItemBar(h,"K1",4/*exBarHAlignCaption*/,COMVariant::createFromInt(18)); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("12/30/2000",213)),COMVariant::createFromDate(str2Date("1/6/2001",213)),"K2","no clip, outside, center(<b>17</b>)"); com_Items.ItemBar(h,"K2",4/*exBarHAlignCaption*/,COMVariant::createFromInt(17)); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("12/30/2000",213)),COMVariant::createFromDate(str2Date("1/6/2001",213)),"K3","no clip, outside, left(<b>16</b>)"); com_Items.ItemBar(h,"K3",4/*exBarHAlignCaption*/,COMVariant::createFromInt(16)); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(false,216); } */ |
1755 |
Is there a way to prevent the automatic horizontal scrolling of the chart when moving or resizing a bar (method 2)
// DateChange event - Occurs when the first visible date is changed. void onEvent_DateChange() { ; exg2antt1.Chart().FirstVisibleDate(COMVariant::createFromDate(str2Date("1/2/2001",213))); } public void init() { COM com_Chart,com_Column,com_Column1,com_Items; anytype var_Chart,var_Column,var_Column1,var_Items; ; super(); exg2antt1.BeginUpdate(); exg2antt1.Columns().Add("Tasks"); var_Column = COM::createFromVariant(exg2antt1.Columns().Add("Start")); com_Column = var_Column; com_Column.Def(18/*exCellValueToItemBarProperty*/,COMVariant::createFromInt(1)); com_Column.Visible(false); com_Column.Alignment(0/*LeftAlignment*/); var_Column1 = COM::createFromVariant(exg2antt1.Columns().Add("End")); com_Column1 = var_Column1; com_Column1.Def(18/*exCellValueToItemBarProperty*/,COMVariant::createFromInt(2)); com_Column1.Visible(false); com_Column1.Alignment(2/*RightAlignment*/); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("1/2/2001",213))); com_Chart.LevelCount(2); /*should be called during the form's activate method*/ com_Chart.PaneWidth(false,48); com_Chart.ColumnsFormatLevel("1[bg=12500670]:52,|,2[bg=12500670]:52"); com_Chart.ColumnsTransparent(50); com_Chart.ScrollBar(false); var_Items = exg2antt1.Items(); com_Items = var_Items; com_Items.AllowCellValueToItemBar(true); com_Items.AddBar(com_Items.AddItem("Task 1"),"Task",COMVariant::createFromDate(str2Date("1/3/2001",213)),COMVariant::createFromDate(str2Date("1/7/2001",213))); com_Items.AddBar(com_Items.AddItem("Task 2"),"Task",COMVariant::createFromDate(str2Date("1/4/2001",213)),COMVariant::createFromDate(str2Date("1/8/2001",213))); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(false,48); } */ |
1754 |
Is there a way to prevent the automatic horizontal scrolling of the chart when moving or resizing a bar, including limiting the bars
// BarResizing event - Occurs when a bar is moving or resizing. void onEvent_BarResizing(int _Item,COMVariant _Key) { COM com_Items; anytype var_Items; ; var_Items = exg2antt1.Items(); com_Items = var_Items; com_Items.ItemBar(_Item,_Key,22/*exBarMinStart*/,COMVariant::createFromDate(str2Date("1/1/2001",213))); com_Items.ItemBar(_Item,_Key,25/*exBarMaxEnd*/,COMVariant::createFromDate(str2Date("2/1/2001",213))); } public void init() { COM com_Chart,com_Column,com_Column1,com_Items; anytype var_Chart,var_Column,var_Column1,var_Items; ; super(); exg2antt1.BeginUpdate(); exg2antt1.Columns().Add("Tasks"); var_Column = COM::createFromVariant(exg2antt1.Columns().Add("Start")); com_Column = var_Column; com_Column.Def(18/*exCellValueToItemBarProperty*/,COMVariant::createFromInt(1)); com_Column.Visible(false); com_Column.Alignment(0/*LeftAlignment*/); var_Column1 = COM::createFromVariant(exg2antt1.Columns().Add("End")); com_Column1 = var_Column1; com_Column1.Def(18/*exCellValueToItemBarProperty*/,COMVariant::createFromInt(2)); com_Column1.Visible(false); com_Column1.Alignment(2/*RightAlignment*/); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("1/2/2001",213))); com_Chart.LevelCount(2); /*should be called during the form's activate method*/ com_Chart.PaneWidth(false,48); com_Chart.ColumnsFormatLevel("1[bg=12500670]:52,|,2[bg=12500670]:52"); com_Chart.ColumnsTransparent(50); com_Chart.ScrollRange(0/*exStartDate*/,COMVariant::createFromDate(str2Date("1/1/2001",213))); com_Chart.ScrollRange(1/*exEndDate*/,COMVariant::createFromDate(str2Date("1/31/2001",213))); var_Items = exg2antt1.Items(); com_Items = var_Items; com_Items.AllowCellValueToItemBar(true); com_Items.AddBar(com_Items.AddItem("Task 1"),"Task",COMVariant::createFromDate(str2Date("1/3/2001",213)),COMVariant::createFromDate(str2Date("1/7/2001",213))); com_Items.AddBar(com_Items.AddItem("Task 2"),"Task",COMVariant::createFromDate(str2Date("1/4/2001",213)),COMVariant::createFromDate(str2Date("1/8/2001",213))); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(false,48); } */ |
1753 |
Is there a way to prevent the automatic horizontal scrolling of the chart when moving or resizing a bar (method 1)
public void init() { COM com_Chart,com_Column,com_Column1,com_Items; anytype var_Chart,var_Column,var_Column1,var_Items; ; super(); exg2antt1.BeginUpdate(); exg2antt1.Columns().Add("Tasks"); var_Column = COM::createFromVariant(exg2antt1.Columns().Add("Start")); com_Column = var_Column; com_Column.Def(18/*exCellValueToItemBarProperty*/,COMVariant::createFromInt(1)); com_Column.Visible(false); com_Column.Alignment(0/*LeftAlignment*/); var_Column1 = COM::createFromVariant(exg2antt1.Columns().Add("End")); com_Column1 = var_Column1; com_Column1.Def(18/*exCellValueToItemBarProperty*/,COMVariant::createFromInt(2)); com_Column1.Visible(false); com_Column1.Alignment(2/*RightAlignment*/); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("1/2/2001",213))); com_Chart.LevelCount(2); /*should be called during the form's activate method*/ com_Chart.PaneWidth(false,48); com_Chart.ColumnsFormatLevel("1[bg=12500670]:52,|,2[bg=12500670]:52"); com_Chart.ColumnsTransparent(50); com_Chart.ScrollRange(0/*exStartDate*/,COMVariant::createFromDate(str2Date("1/1/2001",213))); com_Chart.ScrollRange(1/*exEndDate*/,COMVariant::createFromDate(str2Date("1/31/2001",213))); var_Items = exg2antt1.Items(); com_Items = var_Items; com_Items.AllowCellValueToItemBar(true); com_Items.AddBar(com_Items.AddItem("Task 1"),"Task",COMVariant::createFromDate(str2Date("1/3/2001",213)),COMVariant::createFromDate(str2Date("1/7/2001",213))); com_Items.AddBar(com_Items.AddItem("Task 2"),"Task",COMVariant::createFromDate(str2Date("1/4/2001",213)),COMVariant::createFromDate(str2Date("1/8/2001",213))); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(false,48); } */ |
1752 |
Is it possible to have "Preview Window" as a "Modal Window or 'always-on-top window'"
public void init() { COM com_Items,com_Print; anytype var_Items,var_Print; int h1,h2; ; super(); exg2antt1.BeginUpdate(); exg2antt1.Columns().Add("Task"); exg2antt1.Chart().FirstVisibleDate(COMVariant::createFromDate(str2Date("1/1/2001",213))); var_Items = exg2antt1.Items(); com_Items = var_Items; h1 = com_Items.AddItem("Task 1"); com_Items.AddBar(h1,"Task",COMVariant::createFromDate(str2Date("1/2/2001",213)),COMVariant::createFromDate(str2Date("1/4/2001",213)),"K1"); h2 = com_Items.AddItem("Task 2"); com_Items.AddBar(h2,"Task",COMVariant::createFromDate(str2Date("1/5/2001",213)),COMVariant::createFromDate(str2Date("1/7/2001",213)),"K2"); com_Items.AddLink("L1",h1,"K1",h2,"K2"); com_Items.Link("L1",6/*exLinkStartPos*/,COMVariant::createFromInt(0)); exg2antt1.EndUpdate(); // Add 'exprint.dll(ExPrint.dll)' reference to your project. // Add 'ExPrint 1.0 Control Library(ExPrint.dll)' reference to your project. var_Print = COM::createFromObject(new EXPRINTLib.exprint()); com_Print = var_Print; print( com_Print.Version() ); com_Print.Foreground(-1); com_Print.PrintExt(exg2antt1); com_Print.Preview(); } |
1751 |
The week number is not correct (wrong). What can I do
|
1750 |
When the user zooms with the mouse, the chart automatically switches the unit scale - ideally I'd like to replicate this so I can switch the unitscale at the same "zoom levels" that the mouse zooming does - is this possible
// ChartEndChanging event - Occurs after the chart has been changed. void onEvent_ChartEndChanging(int _Operation) { COM com_Chart; anytype var_Chart; ; var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; print( "FirstVisibleDate" ); print( com_Chart.FirstVisibleDate() ); print( "UnitScale" ); print( com_Chart.UnitScale() ); print( "UnitWidth" ); print( com_Chart.UnitWidth() ); } public void init() { COM com_Chart; anytype var_Chart; ; super(); exg2antt1.BeginUpdate(); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; com_Chart.LevelCount(3); com_Chart.AllowResizeChart(262/*exAllowChangeUnitScale | exAllowResizeChartMiddle | exAllowResizeChartHeader*/); /*should be called during the form's activate method*/ com_Chart.PaneWidth(false,0); com_Chart.MarkTodayColor(com_Chart.BackColor()); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(false,0); } */ |
1749 |
The first week number is not correctly assigned. What can I do
|
1748 |
How can I display the +/- expand - collapse buttons, a bit larger
public void init() { COM com_Appearance,com_Items; anytype var_Appearance,var_Items; int h; ; super(); exg2antt1.BeginUpdate(); var_Appearance = exg2antt1.VisualAppearance(); com_Appearance = var_Appearance; com_Appearance.Add(3,"c:\\exontrol\\images\\normal.ebn"); com_Appearance.Add(4,"c:\\exontrol\\images\\pushed.ebn"); com_Appearance.Add(1,"CP:3 -4 -4 4 4"); com_Appearance.Add(2,"CP:4 -4 -4 4 4"); exg2antt1.LinesAtRoot(1/*exGroupLinesAtRoot*/); exg2antt1.HasButtons(4/*exCustom*/); exg2antt1.HasButtonsCustom(0,16777216); exg2antt1.HasButtonsCustom(1,33554432); exg2antt1.Columns().Add("Column"); var_Items = exg2antt1.Items(); com_Items = var_Items; h = com_Items.AddItem("Root 1"); com_Items.InsertItem(h,,"Child 1"); com_Items.InsertItem(h,,"Child 2"); com_Items.ExpandItem(h,true); h = com_Items.AddItem("Root 2"); com_Items.InsertItem(h,,"Child"); exg2antt1.EndUpdate(); } |
1747 |
Is there any option to control where I can drop the items when using the AutoDrag property
// AllowAutoDrag event - Occurs when the user drags the item between InsertA and InsertB as child of NewParent. void onEvent_AllowAutoDrag(int _Item,int _NewParent,int _InsertA,int _InsertB,COMVariant /*bool*/ _Cancel) { COM com_Items; anytype var_Items; ; var_Items = exg2antt1.Items(); com_Items = var_Items; print( "NewParent" ); print( com_Items.CellCaption(_NewParent,COMVariant::createFromInt(0)) ); print( "After" ); print( com_Items.CellCaption(_InsertA,COMVariant::createFromInt(0)) ); print( "Before" ); print( com_Items.CellCaption(_InsertB,COMVariant::createFromInt(0)) ); _Cancel = true; } public void init() { COM com_Chart,com_Items; anytype var_Chart,var_Items; int h,h1,h2,h3; ; super(); exg2antt1.BeginUpdate(); exg2antt1.AutoDrag(3/*exAutoDragPositionAny*/); exg2antt1.LinesAtRoot(0/*exNoLinesAtRoot*/); exg2antt1.HasLines(2/*exThinLine*/); exg2antt1.ShowFocusRect(false); exg2antt1.Columns().Add("Task"); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; com_Chart.ShowNonworkingDates(false); com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("12/29/2000",213))); /*should be called during the form's activate method*/ com_Chart.PaneWidth(false,96); com_Chart.LevelCount(2); var_Items = exg2antt1.Items(); com_Items = var_Items; h = com_Items.AddItem("Group 1"); com_Items.ItemDivider(h,0); com_Items.ItemBold(h,true); h1 = com_Items.InsertItem(h,,"Task 1"); com_Items.AddBar(h1,"Task",COMVariant::createFromDate(str2Date("1/2/2001",213)),COMVariant::createFromDate(str2Date("1/4/2001",213)),"K1"); h2 = com_Items.InsertItem(h,,"Task 2"); com_Items.AddBar(h2,"Task",COMVariant::createFromDate(str2Date("1/5/2001",213)),COMVariant::createFromDate(str2Date("1/7/2001",213)),"K2"); com_Items.AddLink("L1",h1,"K1",h2,"K2"); com_Items.Link("L1",12/*exLinkText*/,"L1"); h3 = com_Items.InsertItem(h,,"Task 3"); com_Items.AddBar(h3,"Task",COMVariant::createFromDate(str2Date("1/8/2001",213)),COMVariant::createFromDate(str2Date("1/10/2001",213)),"K3"); com_Items.AddLink("L2",h2,"K2",h3,"K3"); com_Items.Link("L2",12/*exLinkText*/,"L2"); com_Items.ExpandItem(h,true); h = com_Items.AddItem("Group 2"); com_Items.ItemBold(h,true); com_Items.ItemDivider(h,0); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(false,96); } */ |
1746 |
The column (chart section ) overlaps the bars, when using the ColumnsFormatLevel property. How can I prevent that
public void init() { COM com_Chart,com_Column,com_Column1,com_Items; anytype var_Chart,var_Column,var_Column1,var_Items; ; super(); exg2antt1.BeginUpdate(); exg2antt1.Columns().Add("Tasks"); var_Column = COM::createFromVariant(exg2antt1.Columns().Add("Start")); com_Column = var_Column; com_Column.Def(18/*exCellValueToItemBarProperty*/,COMVariant::createFromInt(1)); com_Column.Visible(false); com_Column.Alignment(0/*LeftAlignment*/); var_Column1 = COM::createFromVariant(exg2antt1.Columns().Add("End")); com_Column1 = var_Column1; com_Column1.Def(18/*exCellValueToItemBarProperty*/,COMVariant::createFromInt(2)); com_Column1.Visible(false); com_Column1.Alignment(2/*RightAlignment*/); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("1/2/2001",213))); com_Chart.LevelCount(2); /*should be called during the form's activate method*/ com_Chart.PaneWidth(false,48); com_Chart.ColumnsFormatLevel("1[bg=12500670]:52,|,2[bg=12500670]:52"); com_Chart.ColumnsTransparent(50); var_Items = exg2antt1.Items(); com_Items = var_Items; com_Items.AllowCellValueToItemBar(true); com_Items.AddBar(com_Items.AddItem("Task 1"),"Task",COMVariant::createFromDate(str2Date("1/3/2001",213)),COMVariant::createFromDate(str2Date("1/7/2001",213))); com_Items.AddBar(com_Items.AddItem("Task 2"),"Task",COMVariant::createFromDate(str2Date("1/4/2001",213)),COMVariant::createFromDate(str2Date("1/8/2001",213))); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(false,48); } */ |
1745 |
How do I show the column ( chart section ) with a different background color, when using the ColumnsFormatLevel property (method 2)
public void init() { COM com_Chart,com_Column,com_Column1,com_Items; anytype var_Chart,var_Column,var_Column1,var_Items; ; super(); exg2antt1.BeginUpdate(); exg2antt1.Columns().Add("Tasks"); var_Column = COM::createFromVariant(exg2antt1.Columns().Add("Start")); com_Column = var_Column; com_Column.Def(18/*exCellValueToItemBarProperty*/,COMVariant::createFromInt(1)); com_Column.Visible(false); com_Column.Alignment(0/*LeftAlignment*/); var_Column1 = COM::createFromVariant(exg2antt1.Columns().Add("End")); com_Column1 = var_Column1; com_Column1.Def(18/*exCellValueToItemBarProperty*/,COMVariant::createFromInt(2)); com_Column1.Visible(false); com_Column1.Alignment(2/*RightAlignment*/); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("1/2/2001",213))); com_Chart.LevelCount(2); /*should be called during the form's activate method*/ com_Chart.PaneWidth(false,48); com_Chart.ColumnsFormatLevel("1[bg=12500670]:52,|,2[bg=12500670]:52"); var_Items = exg2antt1.Items(); com_Items = var_Items; com_Items.AllowCellValueToItemBar(true); com_Items.AddBar(com_Items.AddItem("Task 1"),"Task",COMVariant::createFromDate(str2Date("1/3/2001",213)),COMVariant::createFromDate(str2Date("1/7/2001",213))); com_Items.AddBar(com_Items.AddItem("Task 2"),"Task",COMVariant::createFromDate(str2Date("1/4/2001",213)),COMVariant::createFromDate(str2Date("1/8/2001",213))); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(false,48); } */ |
1744 |
How do I show the column ( chart section ) with a different background color, when using the ColumnsFormatLevel property (method 1)
public void init() { COM com_Chart,com_Column,com_Column1,com_Items; anytype var_Chart,var_Column,var_Column1,var_Items; ; super(); exg2antt1.BeginUpdate(); exg2antt1.Columns().Add("Tasks"); var_Column = COM::createFromVariant(exg2antt1.Columns().Add("Start")); com_Column = var_Column; com_Column.Def(18/*exCellValueToItemBarProperty*/,COMVariant::createFromInt(1)); com_Column.Visible(false); com_Column.Alignment(0/*LeftAlignment*/); com_Column.Def(4/*exCellBackColor*/,COMVariant::createFromInt(12500670)); var_Column1 = COM::createFromVariant(exg2antt1.Columns().Add("End")); com_Column1 = var_Column1; com_Column1.Def(18/*exCellValueToItemBarProperty*/,COMVariant::createFromInt(2)); com_Column1.Visible(false); com_Column1.Alignment(2/*RightAlignment*/); com_Column1.Def(4/*exCellBackColor*/,COMVariant::createFromInt(12500670)); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("12/31/2000",213))); com_Chart.LevelCount(2); /*should be called during the form's activate method*/ com_Chart.PaneWidth(false,48); com_Chart.ColumnsFormatLevel("1:52,|,2:52"); var_Items = exg2antt1.Items(); com_Items = var_Items; com_Items.AllowCellValueToItemBar(true); com_Items.AddBar(com_Items.AddItem("Task 1"),"Task",COMVariant::createFromDate(str2Date("1/3/2001",213)),COMVariant::createFromDate(str2Date("1/7/2001",213))); com_Items.AddBar(com_Items.AddItem("Task 2"),"Task",COMVariant::createFromDate(str2Date("1/4/2001",213)),COMVariant::createFromDate(str2Date("1/8/2001",213))); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(false,48); } */ |
1743 |
How can I display the control's content on an single A3 paper size, when using PDF format
public void init() { COM com_Bar,com_Chart,com_Items,com_Note,com_Note1,com_Notes; COMVariant var_CopyTo; anytype var_Bar,var_Chart,var_Items,var_Note,var_Note1,var_Notes; int h; ; super(); exg2antt1.BeginUpdate(); exg2antt1.Columns().Add("Task"); exg2antt1.AntiAliasing(true); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("12/24/2000",213))); /*should be called during the form's activate method*/ com_Chart.PaneWidth(false,96); com_Chart.LevelCount(2); com_Chart.UnitScale(4096/*exDay*/); var_Bar = COM::createFromObject(com_Chart.Bars()).Item("Task"); com_Bar = var_Bar; com_Bar.Pattern(1/*exPatternSolid*/); com_Bar.Color(WinApi::RGB2int(0,0,0)); com_Bar.Height(16); var_Items = exg2antt1.Items(); com_Items = var_Items; h = com_Items.AddItem("Task 1"); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("12/25/2000",213)),COMVariant::createFromDate(str2Date("1/5/2001",213)),"1","<fgcolor=FFFFFF>Center"); com_Items.ItemBar(h,"1",44/*exBarExtraCaption*/,"left"); com_Items.ItemBar(h,"1",45/*exBarExtraCaptionHAlign*/,COMVariant::createFromInt(16)); h = com_Items.AddItem("Task 2"); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("1/5/2001",213)),COMVariant::createFromDate(str2Date("1/16/2001",213)),"1","<fgcolor=FFFFFF>Center"); h = com_Items.AddItem("Task 3"); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("1/16/2001",213)),COMVariant::createFromDate(str2Date("1/26/2001",213)),"2","Center"); com_Items.ItemBar(h,"2",44/*exBarExtraCaption*/,"right"); com_Items.ItemBar(h,"2",45/*exBarExtraCaptionHAlign*/,COMVariant::createFromInt(18)); var_Notes = exg2antt1.Chart().Notes(); com_Notes = var_Notes; var_Note = com_Notes.Add("1S",exg2antt1.Items().ItemByIndex(1),"1","<%m3%>-<%d%>"); com_Note = var_Note; com_Note.PartShadow(1/*exNoteEnd*/,false); com_Note.PartHOffset(1/*exNoteEnd*/,-16); com_Note.PartVOffset(1/*exNoteEnd*/,4); var_Note1 = com_Notes.Add("1F",exg2antt1.Items().ItemByIndex(1),"1","<%m3%>-<%d%>"); com_Note1 = var_Note1; com_Note1.RelativePosition(COMVariant::createFromInt(1)); com_Note1.PartShadow(1/*exNoteEnd*/,false); com_Note1.PartHOffset(1/*exNoteEnd*/,16); com_Note1.PartVOffset(1/*exNoteEnd*/,-4); var_CopyTo = exg2antt1.CopyTo("C:\\Temp\\Preview.pdf|11.69 in x 16.53 in||single"); print( "Look for C:\\Temp\\Preview.pd file." ); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(false,96); } */ |
1742 |
How can I display the control's content on an A3 paper size, when using PDF format
public void init() { COM com_Bar,com_Chart,com_Items,com_Note,com_Note1,com_Notes; COMVariant var_CopyTo; anytype var_Bar,var_Chart,var_Items,var_Note,var_Note1,var_Notes; int h; ; super(); exg2antt1.BeginUpdate(); exg2antt1.Columns().Add("Task"); exg2antt1.AntiAliasing(true); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("12/24/2000",213))); /*should be called during the form's activate method*/ com_Chart.PaneWidth(false,96); com_Chart.LevelCount(2); com_Chart.UnitScale(4096/*exDay*/); var_Bar = COM::createFromObject(com_Chart.Bars()).Item("Task"); com_Bar = var_Bar; com_Bar.Pattern(1/*exPatternSolid*/); com_Bar.Color(WinApi::RGB2int(0,0,0)); com_Bar.Height(16); var_Items = exg2antt1.Items(); com_Items = var_Items; h = com_Items.AddItem("Task 1"); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("12/25/2000",213)),COMVariant::createFromDate(str2Date("1/5/2001",213)),"1","<fgcolor=FFFFFF>Center"); com_Items.ItemBar(h,"1",44/*exBarExtraCaption*/,"left"); com_Items.ItemBar(h,"1",45/*exBarExtraCaptionHAlign*/,COMVariant::createFromInt(16)); h = com_Items.AddItem("Task 2"); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("1/5/2001",213)),COMVariant::createFromDate(str2Date("1/16/2001",213)),"1","<fgcolor=FFFFFF>Center"); h = com_Items.AddItem("Task 3"); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("1/16/2001",213)),COMVariant::createFromDate(str2Date("1/26/2001",213)),"2","Center"); com_Items.ItemBar(h,"2",44/*exBarExtraCaption*/,"right"); com_Items.ItemBar(h,"2",45/*exBarExtraCaptionHAlign*/,COMVariant::createFromInt(18)); var_Notes = exg2antt1.Chart().Notes(); com_Notes = var_Notes; var_Note = com_Notes.Add("1S",exg2antt1.Items().ItemByIndex(1),"1","<%m3%>-<%d%>"); com_Note = var_Note; com_Note.PartShadow(1/*exNoteEnd*/,false); com_Note.PartHOffset(1/*exNoteEnd*/,-16); com_Note.PartVOffset(1/*exNoteEnd*/,4); var_Note1 = com_Notes.Add("1F",exg2antt1.Items().ItemByIndex(1),"1","<%m3%>-<%d%>"); com_Note1 = var_Note1; com_Note1.RelativePosition(COMVariant::createFromInt(1)); com_Note1.PartShadow(1/*exNoteEnd*/,false); com_Note1.PartHOffset(1/*exNoteEnd*/,16); com_Note1.PartVOffset(1/*exNoteEnd*/,-4); var_CopyTo = exg2antt1.CopyTo("C:\\Temp\\Preview.pdf|11.69 in x 16.53 in"); print( "Look for C:\\Temp\\Preview.pd file." ); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(false,96); } */ |
1741 |
How can I specify the grouping strategy, ie numbers from 1 to 5 are given the value (1-5) and grouping is done on this new value
// AddGroupItem event - Occurs after a new Group Item has been inserted to Items collection. void onEvent_AddGroupItem(int _Item) { COM com_Items; anytype var_Items; ; var_Items = exg2antt1.Items(); com_Items = var_Items; com_Items.ItemBold(_Item,true); com_Items.AddBar(_Item,"Summary",com_Items.CellValue(_Item,COMVariant::createFromInt(1)),com_Items.CellValue(_Item,COMVariant::createFromInt(2))); com_Items.DefineSummaryBars(_Item,"",-3,""); } public void init() { COM com_Chart,com_Column,com_Column1,com_Column2,com_Columns,com_Items; anytype var_Chart,var_Column,var_Column1,var_Column2,var_Columns,var_Items; ; super(); exg2antt1.BeginUpdate(); exg2antt1.AllowGroupBy(true); exg2antt1.SortBarVisible(true); exg2antt1.MarkSearchColumn(false); var_Columns = exg2antt1.Columns(); com_Columns = var_Columns; com_Columns.Add("Tasks"); var_Column = COM::createFromVariant(com_Columns.Add("Start")); com_Column = var_Column; com_Column.Def(18/*exCellValueToItemBarProperty*/,COMVariant::createFromInt(1)); com_Column.AllowGroupBy(false); var_Column1 = COM::createFromVariant(com_Columns.Add("End")); com_Column1 = var_Column1; com_Column1.Def(18/*exCellValueToItemBarProperty*/,COMVariant::createFromInt(2)); com_Column1.AllowGroupBy(false); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("9/20/2006",213))); com_Chart.LevelCount(2); /*should be called during the form's activate method*/ com_Chart.PaneWidth(0,256); var_Items = exg2antt1.Items(); com_Items = var_Items; com_Items.AllowCellValueToItemBar(true); com_Items.AddBar(com_Items.AddItem("1"),"Task",COMVariant::createFromDate(str2Date("9/21/2006",213)),COMVariant::createFromDate(str2Date("9/27/2006",213))); com_Items.AddBar(com_Items.AddItem("1"),"Task",COMVariant::createFromDate(str2Date("9/22/2006",213)),COMVariant::createFromDate(str2Date("9/28/2006",213))); com_Items.AddBar(com_Items.AddItem("2"),"Task",COMVariant::createFromDate(str2Date("9/22/2006",213)),COMVariant::createFromDate(str2Date("9/28/2006",213))); com_Items.AddBar(com_Items.AddItem("2"),"Task",COMVariant::createFromDate(str2Date("9/23/2006",213)),COMVariant::createFromDate(str2Date("9/29/2006",213))); com_Items.AddBar(com_Items.AddItem("3"),"Task",COMVariant::createFromDate(str2Date("9/25/2006",213)),COMVariant::createFromDate(str2Date("9/29/2006",213))); com_Items.AddBar(com_Items.AddItem("3"),"Task",COMVariant::createFromDate(str2Date("9/26/2006",213)),COMVariant::createFromDate(str2Date("9/30/2006",213))); var_Column2 = COM::createFromVariant(exg2antt1.Columns().Add("Tasks - Group")); com_Column2 = var_Column2; com_Column2.Visible(false); com_Column2.FormatColumn("%0 in (1,2) ? `1 - 2` : `3 -`"); com_Column2.SortOrder(1/*SortAscending*/); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(0,256); } */ |
1740 |
How can I filter the chart and its content, not the items section
// RClick event - Fired when right mouse button is clicked void onEvent_RClick() { COM com_Column; anytype var_Column; ; var_Column = COM::createFromObject(exg2antt1.Columns()).Item("Start"); com_Column = var_Column; com_Column.ShowFilter("-1,-1,128,128"); } public void init() { COM com_Chart,com_Column,com_Column1,com_Columns,com_Items; anytype var_Chart,var_Column,var_Column1,var_Columns,var_Items; ; super(); exg2antt1.BeginUpdate(); exg2antt1.SortBarVisible(true); exg2antt1.MarkSearchColumn(false); var_Columns = exg2antt1.Columns(); com_Columns = var_Columns; com_Columns.Add("Tasks"); var_Column = COM::createFromVariant(com_Columns.Add("Start")); com_Column = var_Column; com_Column.Def(18/*exCellValueToItemBarProperty*/,COMVariant::createFromInt(1)); com_Column.DisplayFilterDate(true); com_Column.DisplayFilterPattern(false); com_Column.FilterList(8448/*exShowExclude | exShowCheckBox*/); com_Column.Visible(false); var_Column1 = COM::createFromVariant(com_Columns.Add("End")); com_Column1 = var_Column1; com_Column1.Def(18/*exCellValueToItemBarProperty*/,COMVariant::createFromInt(2)); com_Column1.DisplayFilterDate(true); com_Column1.DisplayFilterPattern(false); com_Column1.Visible(false); com_Column1.FilterList(8448/*exShowExclude | exShowCheckBox*/); com_Column1.Visible(false); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("9/20/2006",213))); com_Chart.LevelCount(2); /*should be called during the form's activate method*/ com_Chart.PaneWidth(0,128); var_Items = exg2antt1.Items(); com_Items = var_Items; com_Items.AllowCellValueToItemBar(true); com_Items.AddBar(com_Items.AddItem("Task 1"),"Task",COMVariant::createFromDate(str2Date("9/21/2006",213)),COMVariant::createFromDate(str2Date("9/27/2006",213))); com_Items.AddBar(com_Items.AddItem("Task 2"),"Task",COMVariant::createFromDate(str2Date("9/22/2006",213)),COMVariant::createFromDate(str2Date("9/28/2006",213))); com_Items.AddBar(com_Items.AddItem("Task 3"),"Task",COMVariant::createFromDate(str2Date("9/22/2006",213)),COMVariant::createFromDate(str2Date("9/28/2006",213))); com_Items.AddBar(com_Items.AddItem("Task 4"),"Task",COMVariant::createFromDate(str2Date("9/23/2006",213)),COMVariant::createFromDate(str2Date("9/29/2006",213))); com_Items.AddBar(com_Items.AddItem("Task 5"),"Task",COMVariant::createFromDate(str2Date("9/25/2006",213)),COMVariant::createFromDate(str2Date("9/29/2006",213))); com_Items.AddBar(com_Items.AddItem("Task 6"),"Task",COMVariant::createFromDate(str2Date("9/26/2006",213)),COMVariant::createFromDate(str2Date("9/30/2006",213))); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(0,128); } */ |
1739 |
How do I enable the Group-By feature
// AddGroupItem event - Occurs after a new Group Item has been inserted to Items collection. void onEvent_AddGroupItem(int _Item) { COM com_Items; anytype var_Items; ; var_Items = exg2antt1.Items(); com_Items = var_Items; com_Items.ItemBackColor(_Item,WinApi::RGB2int(240,240,240)); exg2antt1.Chart().ItemBackColor(_Item,WinApi::RGB2int(240,240,240)); com_Items.ItemDividerLine(_Item,0/*EmptyLine*/); com_Items.AddBar(_Item,"Summary",com_Items.CellValue(_Item,COMVariant::createFromInt(1)),com_Items.CellValue(_Item,COMVariant::createFromInt(2))); com_Items.DefineSummaryBars(_Item,"",-3,""); } public void init() { COM com_Chart,com_Column,com_Column1,com_Column2,com_Columns,com_Items; anytype var_Chart,var_Column,var_Column1,var_Column2,var_Columns,var_Items; ; super(); exg2antt1.BeginUpdate(); exg2antt1.AllowGroupBy(true); exg2antt1.SortBarVisible(true); exg2antt1.MarkSearchColumn(false); var_Columns = exg2antt1.Columns(); com_Columns = var_Columns; com_Columns.Add("Tasks"); var_Column = COM::createFromVariant(com_Columns.Add("Start")); com_Column = var_Column; com_Column.Def(18/*exCellValueToItemBarProperty*/,COMVariant::createFromInt(1)); com_Column.AllowGroupBy(false); var_Column1 = COM::createFromVariant(com_Columns.Add("End")); com_Column1 = var_Column1; com_Column1.Def(18/*exCellValueToItemBarProperty*/,COMVariant::createFromInt(2)); com_Column1.AllowGroupBy(false); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("9/20/2006",213))); com_Chart.LevelCount(2); /*should be called during the form's activate method*/ com_Chart.PaneWidth(0,256); var_Items = exg2antt1.Items(); com_Items = var_Items; com_Items.AllowCellValueToItemBar(true); com_Items.AddBar(com_Items.AddItem("Task 1"),"Task",COMVariant::createFromDate(str2Date("9/21/2006",213)),COMVariant::createFromDate(str2Date("9/27/2006",213))); com_Items.AddBar(com_Items.AddItem("Task 1"),"Task",COMVariant::createFromDate(str2Date("9/22/2006",213)),COMVariant::createFromDate(str2Date("9/28/2006",213))); com_Items.AddBar(com_Items.AddItem("Task 2"),"Task",COMVariant::createFromDate(str2Date("9/22/2006",213)),COMVariant::createFromDate(str2Date("9/28/2006",213))); com_Items.AddBar(com_Items.AddItem("Task 2"),"Task",COMVariant::createFromDate(str2Date("9/23/2006",213)),COMVariant::createFromDate(str2Date("9/29/2006",213))); com_Items.AddBar(com_Items.AddItem("Task 3"),"Task",COMVariant::createFromDate(str2Date("9/25/2006",213)),COMVariant::createFromDate(str2Date("9/29/2006",213))); com_Items.AddBar(com_Items.AddItem("Task 3"),"Task",COMVariant::createFromDate(str2Date("9/26/2006",213)),COMVariant::createFromDate(str2Date("9/30/2006",213))); var_Column2 = COM::createFromObject(exg2antt1.Columns()).Item(COMVariant::createFromInt(0)); com_Column2 = var_Column2; com_Column2.SortOrder(1/*SortAscending*/); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(0,256); } */ |
1738 |
Is there any method to know number/length/count/duration of working days in a bar ( excluding non-working days)
// SelectionChanged event - Fired after a new item has been selected. void onEvent_SelectionChanged() { COM com_Items; anytype var_Items; ; var_Items = exg2antt1.Items(); com_Items = var_Items; print( com_Items.CellCaption(com_Items.FocusItem(),COMVariant::createFromInt(0)) ); print( com_Items.ItemBar(com_Items.FocusItem(),"",258/*exBarWorkingCount*/) ); } public void init() { COM com_Bar,com_Bars,com_Chart,com_Items; anytype var_Bar,var_Bars,var_Chart,var_Items; int h; ; super(); exg2antt1.BeginUpdate(); exg2antt1.SelBackColor(WinApi::RGB2int(142,190,255)); exg2antt1.SelForeColor(WinApi::RGB2int(0,0,0)); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; /*should be called during the form's activate method*/ com_Chart.PaneWidth(false,96); com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("1/1/2002",213))); var_Bars = COM::createFromObject(com_Chart.Bars()); com_Bars = var_Bars; var_Bar = COM::createFromObject(com_Bars).Add("Task:Split"); com_Bar = var_Bar; com_Bar.Shortcut("Task"); com_Bar.Def(3/*exBarCaption*/,"<%=%258%><font ;6><off 3>w/units"); com_Bar.Def(4/*exBarHAlignCaption*/,COMVariant::createFromInt(18)); com_Chart.SelBackColor(exg2antt1.SelBackColor()); exg2antt1.Columns().Add("Task"); var_Items = exg2antt1.Items(); com_Items = var_Items; h = com_Items.AddItem("Task A"); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("1/2/2002",213)),COMVariant::createFromDate(str2Date("1/9/2002",213))); h = com_Items.AddItem("Task B"); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("1/3/2002",213)),COMVariant::createFromDate(str2Date("1/8/2002",213))); com_Items.SelectItem(h,true); h = com_Items.AddItem("Task C"); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("1/4/2002",213)),COMVariant::createFromDate(str2Date("1/5/2002",213))); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(false,96); } */ |
1737 |
How do i verify weather specified unit is Nonworking Working Unit
// MouseMove event - Occurs when the user moves the mouse. void onEvent_MouseMove(int _Button,int _Shift,int _X,int _Y) { Date d; int h; ; h = exg2antt1.ItemFromPoint(-1,-1,c,hit); d = exg2antt1.Chart().DateFromPoint(-1,-1); print( d ); print( exg2antt1.Chart().IsNonworkingDate(d,h) ); } public void init() { COM com_Chart,com_Items; Date d; anytype var_Chart,var_Items; int h; ; super(); exg2antt1.BeginUpdate(); exg2antt1.Columns().Add("NonWorking"); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; com_Chart.FirstWeekDay(1/*exMonday*/); com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("1/24/2008",213))); /*should be called during the form's activate method*/ com_Chart.PaneWidth(false,64); com_Chart.LevelCount(2); var_Items = exg2antt1.Items(); com_Items = var_Items; h = com_Items.AddItem("Default"); h = com_Items.AddItem("January"); com_Items.ItemNonworkingUnits(h,COMVariant::createFromBoolean(false),"month(value) = 1"); h = com_Items.AddItem("February, Saturday, Sunday"); com_Items.ItemNonworkingUnits(h,COMVariant::createFromBoolean(false),"month(value) = 2 or (weekday(value) = 0 or weekday(value) = 6)"); h = com_Items.AddItem("Sunday"); com_Items.ItemNonworkingUnits(h,COMVariant::createFromBoolean(false),"weekday(value) = 0"); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(false,64); } */ |
1736 |
How can I specify the bar's caption to be caption from a column/cell
// Change event - Occurs when the user changes the cell's content. void onEvent_Change(int _Item,int _ColIndex,COMVariant /*variant*/ _NewValue) { ; exg2antt1.Refresh(); } public void init() { COM com_Bar,com_Chart,com_Editor,com_Items; anytype var_Bar,var_Chart,var_Editor,var_Items; ; super(); exg2antt1.BeginUpdate(); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("1/1/2001",213))); /*should be called during the form's activate method*/ com_Chart.PaneWidth(false,64); var_Bar = COM::createFromObject(com_Chart.Bars()).Item("Task"); com_Bar = var_Bar; com_Bar.Def(3/*exBarCaption*/,"<fgcolor=808080><%=%C0%>"); com_Bar.Def(4/*exBarHAlignCaption*/,COMVariant::createFromInt(18)); var_Editor = COM::createFromVariant(exg2antt1.Columns().Add("Task")).Editor(); com_Editor = var_Editor; com_Editor.EditType(3/*DropDownListType*/); com_Editor.AddItem(1,"Aka"); com_Editor.AddItem(2,"Baka"); com_Editor.AddItem(3,"Taka"); var_Items = exg2antt1.Items(); com_Items = var_Items; com_Items.AddBar(com_Items.AddItem(COMVariant::createFromInt(1)),"Task",COMVariant::createFromDate(str2Date("1/2/2001",213)),COMVariant::createFromDate(str2Date("1/5/2001",213))); com_Items.AddBar(com_Items.AddItem(COMVariant::createFromInt(2)),"Task",COMVariant::createFromDate(str2Date("1/3/2001",213)),COMVariant::createFromDate(str2Date("1/6/2001",213))); com_Items.AddBar(com_Items.AddItem(COMVariant::createFromInt(3)),"Task",COMVariant::createFromDate(str2Date("1/4/2001",213)),COMVariant::createFromDate(str2Date("1/7/2001",213))); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(false,64); } */ |
1735 |
The histogram values displayed on the chart are using 2 decimal places. Can this be formated to just 0 decimal place, so 86.79% becomes 87%
public void init() { COM com_Bar,com_Chart,com_Column,com_Editor,com_Items; anytype var_Bar,var_Chart,var_Column,var_Editor,var_Items; int h1; ; super(); exg2antt1.BeginUpdate(); exg2antt1.Columns().Add("Tasks"); var_Column = COM::createFromVariant(exg2antt1.Columns().Add("Effort")); com_Column = var_Column; com_Column.Def(18/*exCellValueToItemBarProperty*/,COMVariant::createFromInt(21)); var_Editor = COM::createFromObject(com_Column.Editor()); com_Editor = var_Editor; com_Editor.EditType(4/*SpinType*/); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; com_Chart.LevelCount(2); com_Chart.NonworkingDays(0); /*should be called during the form's activate method*/ com_Chart.PaneWidth(false,96); com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("6/20/2005",213))); com_Chart.HistogramVisible(true); com_Chart.HistogramHeight(128); com_Chart.HistogramView(112/*exHistogramAllItems*/); var_Bar = COM::createFromObject(com_Chart.Bars()).Item("Task"); com_Bar = var_Bar; com_Bar.HistogramPattern(com_Bar.Pattern()); com_Bar.HistogramType(0/*exHistOverload*/); com_Bar.HistogramCriticalValue(3); com_Bar.ShowHistogramValues("value>3?255:1"); com_Bar.HistogramItems(-11); com_Bar.HistogramGridLinesColor(WinApi::RGB2int(192,192,192)); com_Bar.HistogramRulerLinesColor(WinApi::RGB2int(0,0,1)); com_Bar.FormatHistogramValues("(value format `0`) + ` units`"); var_Items = exg2antt1.Items(); com_Items = var_Items; com_Items.AllowCellValueToItemBar(true); h1 = com_Items.AddItem("Task 1"); com_Items.AddBar(h1,"Task",COMVariant::createFromDate(str2Date("6/21/2005",213)),COMVariant::createFromDate(str2Date("6/23/2005",213))); com_Items.CellValue(h1,COMVariant::createFromInt(1),COMVariant::createFromReal(6.79)); h1 = com_Items.AddItem("Task 2"); com_Items.AddBar(h1,"Task",COMVariant::createFromDate(str2Date("6/24/2005",213)),COMVariant::createFromDate(str2Date("6/26/2005",213))); com_Items.CellValue(h1,COMVariant::createFromInt(1),COMVariant::createFromReal(3.19)); h1 = com_Items.AddItem("Task 3"); com_Items.AddBar(h1,"Task",COMVariant::createFromDate(str2Date("6/27/2005",213)),COMVariant::createFromDate(str2Date("6/29/2005",213))); com_Items.CellValue(h1,COMVariant::createFromInt(1),COMVariant::createFromInt(2)); h1 = com_Items.AddItem("Task 4"); com_Items.AddBar(h1,"Task",COMVariant::createFromDate(str2Date("6/30/2005",213)),COMVariant::createFromDate(str2Date("7/2/2005",213))); com_Items.CellValue(h1,COMVariant::createFromInt(1),COMVariant::createFromInt(1)); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(false,96); } */ |
1734 |
How can I create a relative time-scale
public void init() { COM com_Bar,com_Chart,com_Items,com_Level,com_Level1; anytype var_Bar,var_Chart,var_Items,var_Level,var_Level1; int h,hChild; ; super(); exg2antt1.BeginUpdate(); exg2antt1.DefaultItemHeight(24); exg2antt1.HeaderHeight(exg2antt1.DefaultItemHeight()); exg2antt1.GridLineStyle(48/*exGridLinesSolid*/); exg2antt1.DrawGridLines(-1/*exAllLines*/); exg2antt1.LinesAtRoot(0/*exNoLinesAtRoot*/); exg2antt1.BackColorLevelHeader(exg2antt1.BackColor()); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; com_Chart.DrawGridLines(-1/*exAllLines*/); com_Chart.GridLineStyle(48/*exGridLinesSolid*/); /*should be called during the form's activate method*/ com_Chart.PaneWidth(false,128); com_Chart.LevelCount(2); com_Chart.FirstVisibleDate(COMVariant::createFromInt(0)); com_Chart.NonworkingDays(0); com_Chart.UnitWidth(36); var_Level = com_Chart.Level(0); com_Level = var_Level; com_Level.Unit(4096/*exDay*/); com_Level.Count(6); com_Level.Alignment(1/*CenterAlignment*/); com_Level.Label("<%i%>"); com_Level.FormatLabel("'<b>' + ( (value / 6) array ('Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec') ) + '-16'"); var_Level1 = com_Chart.Level(1); com_Level1 = var_Level1; com_Level1.Label("<%i%>"); com_Level1.FormatLabel("1 + value mod 6 + ` `"); com_Level1.Alignment(2/*RightAlignment*/); com_Chart.AdjustLevelsToBase(true); com_Chart.ScrollRange(0/*exStartDate*/,COMVariant::createFromInt(0)); com_Chart.ScrollRange(1/*exEndDate*/,COMVariant::createFromInt(95)); var_Bar = COM::createFromObject(com_Chart.Bars()).Item("Task"); com_Bar = var_Bar; com_Bar.Height(15); com_Bar.Color(WinApi::RGB2int(252,213,180)); com_Bar.Pattern(1/*exPatternSolid*/); com_Bar.Def(3/*exBarCaption*/,"date blocking"); exg2antt1.Columns().Add("Company"); var_Items = exg2antt1.Items(); com_Items = var_Items; h = com_Items.AddItem("ABC Company"); com_Items.ItemBackColor(h,WinApi::RGB2int(240,240,240)); exg2antt1.Chart().ItemBackColor(h,WinApi::RGB2int(240,240,240)); hChild = com_Items.InsertItem(h,,"line 1"); com_Items.AddBar(hChild,"Task",COMVariant::createFromInt(0),COMVariant::createFromInt(3)); hChild = com_Items.InsertItem(h,,"line 2"); com_Items.AddBar(hChild,"Task",COMVariant::createFromInt(3),COMVariant::createFromInt(5),"A"); com_Items.AddBar(hChild,"Task",COMVariant::createFromInt(7),COMVariant::createFromInt(10),"B"); hChild = com_Items.InsertItem(h,,"line 3"); com_Items.AddBar(hChild,"Task",COMVariant::createFromInt(5),COMVariant::createFromInt(8),"A"); com_Items.AddBar(hChild,"Task",COMVariant::createFromInt(9),COMVariant::createFromInt(12),"B"); com_Items.ExpandItem(h,true); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(false,128); } */ |
1733 |
Extending the bar's visual appearance with additional objects, EBNs, using the exBarBackgroundExt and exBarBackgroundExtInflate
public void init() { COM com_Appearance,com_Bar,com_Chart,com_Items; anytype var_Appearance,var_Bar,var_Chart,var_Items; int h; str var_s,var_s1,var_s2,var_s3; ; super(); exg2antt1.BeginUpdate(); exg2antt1.DefaultItemHeight(32); var_Appearance = exg2antt1.VisualAppearance(); com_Appearance = var_Appearance; var_s = "gBFLBCJwBAEHhEJAADhABcMIQAAYAQGKIYBkAKBQAGaAoDDUMQyQwAAyDAK8EwsACEIrAAJoaAAPoJRDGMTvfIgARIf6MIRAeCYFDAJQtDCMICwSKsXBaGwBJYGGaYED"; var_s = var_s + "GHQATxKM7wGBcEyLDSgXZDQRAAoqTI/SICEIlAZJRjoOo5DJGGQmChkQhNVzGQzQSJFDTNAaEAwidDJCoOGgkBw7NwXFaNZznBK7LpvK5HNrie55XzAcj3dbmAYJQzBJ"; var_s = var_s + "LxKSIDwCd6NXrCOJ5HhWDzjQjJMozLC8YiPG6fZRbeT4ToGNdXYhJWiyLiFeYtVzSMj1fD9Ir/EakbLtey4Lq2A53RzdHThSQpCwPA4BgIA="; com_Appearance.Add(1,COMVariant::createFromStr(var_s)); var_s1 = "gBFLBCJwBAEHhEJAADhABcMIQAAYAQGKIYBkAKBQAGaAoDDUMQyQwAAyDAK8EwsACEIrAAJoaAAPoJRDGMTvfIgARIf6MIRAeCYFDAJQtDCMICwSKsXBaGwBJYGGaYED"; var_s1 = var_s1 + "GHQATxKM7wGBcEyLDSgXZDQRAAoqTI/SICEIlAZJRjoOo5DJGGQmChkQhNVzGQzQSJFDTNAaEAwidDJCoOGgkBw7NrXHZ9YwTOC5IDke67cr2J53XZAd4QTb2Cz7QC8Q"; var_s1 = var_s1 + "AvDA7awafM1MSuHIcOw/AqTYDkTq4XjODYhTDEc4zPLcFx/I6haBoWCSLi+T5VVrRMo1TKtRxnNaubZqO5aRrGe5NW6EXThSQpCr+f4BgIA="; com_Appearance.Add(2,COMVariant::createFromStr(var_s1)); var_s2 = "gBFLBCJwBAEHhEJAADhABcMIQAAYAQGKIYBkAKBQAGaAoDDUMQyQwAAyDAK8EwsACEIrAAJoaAAPoJRDGMTvfIgARIf6MIRAeCYFDAJQtDCMICwSKsXBaGwBJYGGaYED"; var_s2 = var_s2 + "GHQATxKM7wGBcEyLDSgXZDQRAAoqTI/SICEIlAZJRjoOo5DJGGQmChkQhNVzGQzQSJFDTNAaEAwidDJCoOGgkBw7NwXFaNZznBK7LpvK5HNrie55XxfV6YBa8B4JPaEZ"; var_s2 = var_s2 + "LwLB7dwaf6IQLiWLYHiAAYZRKTcxlDI8AwvFaaZjnWA5ZaOMZBU7RNRyHR9IyTDaWaTqeqbHIuJ4FUzaNY2fZrOz2F6FAA6cKSFIWFYVAMBA"; com_Appearance.Add(3,COMVariant::createFromStr(var_s2)); var_s3 = "gBFLBCJwBAEHhEJAADhABb8IQAAYAQGKIYBkAKBQAGaAoDDUMQyQwAAyDAK8EwsACEIrAAJoaAAPoJRDGMTvfIgARIf6MIRAeCYFDAJQtDCMICwSKsXBaGwBJYGGaYED"; var_s3 = var_s3 + "GHQATxKM7wGBcEyLDSgXZDQRAAoqTI/SICEIlAZJRjoOo5DJGGQmChkQhNVzGQzQSJFDTNAaEAwidDJCoOGgkBw7NwXFaNZznBK7LpvK5HNrie55XxfV6YBa8B4JPaEZ"; var_s3 = var_s3 + "LwLB7dwaf6IQLiWLYHiAAYBIbJI5yeb5Hx3HqfZjbeSxVoML43SzHcByGRcTwzC6pYjrGoZJpWZ4ZQrbNR3DZ8VzzNTrQxIUhYVhUAkB"; com_Appearance.Add(4,COMVariant::createFromStr(var_s3)); com_Appearance.RenderType(-16777216); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; /*should be called during the form's activate method*/ com_Chart.PaneWidth(false,164); com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("1/1/2001",213))); com_Chart.NonworkingDaysColor(WinApi::RGB2int(240,240,240)); com_Chart.NonworkingDaysPattern(6/*exPatternBDiagonal*/); var_Bar = COM::createFromObject(com_Chart.Bars()).Item("Task"); com_Bar = var_Bar; com_Bar.Height(17); com_Bar.Color(WinApi::RGB2int(255,255,255)); com_Bar.Pattern(1/*exPatternSolid*/); com_Bar.Def(51/*exBarFrameColor*/,COMVariant::createFromInt(1)); exg2antt1.Columns().Add("Column"); var_Items = exg2antt1.Items(); com_Items = var_Items; com_Items.AddBar(com_Items.AddItem("Task"),"Task",COMVariant::createFromDate(str2Date("1/2/2001",213)),COMVariant::createFromDate(str2Date("1/6/2001",213)),""); h = com_Items.AddItem("Task+Rhombus(red)"); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("1/2/2001",213)),COMVariant::createFromDate(str2Date("1/7/2001",213)),""); com_Items.ItemBar(h,"",53/*exBarBackgroundExt*/,"none[(100%-11,50%-6,11,11),back=0x10000FF]"); com_Items.ItemBar(h,"",55/*exBarBackgroundExtInflate*/,",,5"); h = com_Items.AddItem("Rhombus(red)+Task"); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("1/2/2001",213)),COMVariant::createFromDate(str2Date("1/8/2001",213)),""); com_Items.ItemBar(h,"",53/*exBarBackgroundExt*/,"none[(0,50%-6,11,11),back=0x10000FF]"); com_Items.ItemBar(h,"",55/*exBarBackgroundExtInflate*/,"-5"); h = com_Items.AddItem("Task(yellow)+Rhombus(blue)"); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("1/2/2001",213)),COMVariant::createFromDate(str2Date("1/9/2001",213)),""); com_Items.ItemBar(h,"",53/*exBarBackgroundExt*/,"none[(100%-11,50%-6,11,11),back=0x1FF0000]"); com_Items.ItemBar(h,"",55/*exBarBackgroundExtInflate*/,",,5"); com_Items.ItemBar(h,"",33/*exBarColor*/,COMVariant::createFromInt(65535)); h = com_Items.AddItem("Rhombus(blue)+Task(yellow)"); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("1/2/2001",213)),COMVariant::createFromDate(str2Date("1/8/2001",213)),""); com_Items.ItemBar(h,"",53/*exBarBackgroundExt*/,"none[(0,50%-6,11,11),back=0x1FF0000]"); com_Items.ItemBar(h,"",55/*exBarBackgroundExtInflate*/,"-5"); com_Items.ItemBar(h,"",33/*exBarColor*/,COMVariant::createFromInt(65535)); h = com_Items.AddItem("TriangleUp(white)+Task"); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("1/2/2001",213)),COMVariant::createFromDate(str2Date("1/7/2001",213)),""); com_Items.ItemBar(h,"",53/*exBarBackgroundExt*/,"none[(0,50%-6,11,11),back=0x2FFFFFF]"); com_Items.ItemBar(h,"",55/*exBarBackgroundExtInflate*/,"-5"); h = com_Items.AddItem("TriangleUp(blue)+Task(magenta)+TriangleDown(red)"); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("1/2/2001",213)),COMVariant::createFromDate(str2Date("1/6/2001",213)),""); com_Items.ItemBar(h,"",53/*exBarBackgroundExt*/,"none[(0,50%-6,11,11),back=0x02FF0000],none[(100%-11,50%-6,11,11),back=0x030000FF]"); com_Items.ItemBar(h,"",55/*exBarBackgroundExtInflate*/,"-5,0,5,0"); com_Items.ItemBar(h,"",33/*exBarColor*/,COMVariant::createFromInt(16744703)); h = com_Items.AddItem("Rhombus+Task+TriangleDown"); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("1/2/2001",213)),COMVariant::createFromDate(str2Date("1/7/2001",213)),""); com_Items.ItemBar(h,"",53/*exBarBackgroundExt*/,"none[(0,50%-6,11,11),back=0x01FF0000],none[(100%-11,50%-6,11,11),back=0x030000FF]"); com_Items.ItemBar(h,"",55/*exBarBackgroundExtInflate*/,"-5, 0,5,0"); com_Items.ItemBar(h,"",33/*exBarColor*/,COMVariant::createFromInt(16744448)); h = com_Items.AddItem("Rhombus+Task+TriangleDown"); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("1/2/2001",213)),COMVariant::createFromDate(str2Date("1/8/2001",213)),""); com_Items.ItemBar(h,"",53/*exBarBackgroundExt*/,"none[(50%-6,0,11,11),back=0x01FF0000],none[(50%-6,100%-11,11,11),back=0x010000FF]"); com_Items.ItemBar(h,"",55/*exBarBackgroundExtInflate*/,"0,-5,0,5"); h = com_Items.AddItem("Task+Star"); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("1/2/2001",213)),COMVariant::createFromDate(str2Date("1/9/2001",213)),""); com_Items.ItemBar(h,"",53/*exBarBackgroundExt*/,"none[(100%-11,0,11,11),back=0x4FFFFFF]"); com_Items.ItemBar(h,"",55/*exBarBackgroundExtInflate*/,COMVariant::createFromInt(5)); h = com_Items.AddItem("Star+Task"); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("1/2/2001",213)),COMVariant::createFromDate(str2Date("1/8/2001",213)),""); com_Items.ItemBar(h,"",53/*exBarBackgroundExt*/,"none[(0,100%-11,11,11),back=0x04FFFFFF]"); com_Items.ItemBar(h,"",55/*exBarBackgroundExtInflate*/,COMVariant::createFromInt(5)); h = com_Items.AddItem("Task+Star"); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("1/2/2001",213)),COMVariant::createFromDate(str2Date("1/7/2001",213)),""); com_Items.ItemBar(h,"",53/*exBarBackgroundExt*/,"none[(100%-11,0,11,11),back=0x4FFFFFF]"); com_Items.ItemBar(h,"",55/*exBarBackgroundExtInflate*/,"0,-6,14"); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(false,164); } */ |
1732 |
I am using the ItemBar(exBarFrameColor) to display an additional EBN on the current bar. The problem is that I still need a black frame around the bar. How can I achieve that
public void init() { COM com_Appearance,com_Bar,com_Bars,com_Chart,com_Items; anytype var_Appearance,var_Bar,var_Bars,var_Chart,var_Items; int h; str var_s,var_s1; ; super(); exg2antt1.BeginUpdate(); var_Appearance = exg2antt1.VisualAppearance(); com_Appearance = var_Appearance; var_s = "gBFLBCJwBAEHhEJAADhABXMIQAAYAQGKIYBkAKBQAGaAoDDWDoMAANAyjPBMKgBBCLAACaKQAD6CYQRhFT7yGAERr/C6EQLhGBRQCULQxDCBMIjLJoWhsASVRhnCBBRh"; var_s = var_s + "wAI7ShPUBgXBNCQzICTJJkSJZBiECIJFAaJhnIapZDKGKQWCjAgiNpqGQ2QiKFC2HAcEAxCxGJBoKKZGq2bpJQLbdxUXRVZzpNi7Louay5CrOCZvXxaeAXDa+Az5ODDM"; var_s = var_s + "RwLBcKhzCKDYzfdrZFaWFT3Qi8aCvG6sbw/HZ0OrEEIwCEBA"; com_Appearance.Add(1,COMVariant::createFromStr(var_s)); com_Appearance.Add(2,"CP:1 0 0 5 0"); var_s1 = "gBFLBCJwBAEHhEJAADhABUEIQAAYAQGKIYBkAKBQAGaAoDDWDoMAANAyjPBMKgBBCLIxhEYobgmGIaRiBMIxAKIZhzEgYRoiAYhXDiHwxARHUgRfIEOwHDiBZomWKZEi"; var_s1 = var_s1 + "aKIqRrLMryFLMZx3CqcAApGaqHiOCYlSbTcoyfJYZBzD6mKJpWipWheW48U7PVRDJSkNysASZIyrGKqJouX4WR7BcZgNR4YBgEoWRouSBLWrgNIVR6/eBABZFPzbNK3Z"; var_s1 = var_s1 + "zdOIIJgEgIA="; com_Appearance.Add(3,COMVariant::createFromStr(var_s1)); com_Appearance.RenderType(-16777216); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; /*should be called during the form's activate method*/ com_Chart.PaneWidth(false,164); com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("1/1/2001",213))); var_Bar = COM::createFromObject(com_Chart.Bars()).Item("Task"); com_Bar = var_Bar; com_Bar.Color(0x3ff0000); var_Bars = COM::createFromObject(com_Chart.Bars()); com_Bars = var_Bars; var_Bar = COM::createFromObject(com_Bars).Copy("Task","NewTask"); com_Bar = var_Bar; com_Bar.Height(15); exg2antt1.Columns().Add("Column"); var_Items = exg2antt1.Items(); com_Items = var_Items; h = com_Items.AddItem("Task"); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("1/2/2001",213)),COMVariant::createFromDate(str2Date("1/6/2001",213))); com_Items.AddBar(h,"NewTask",COMVariant::createFromDate(str2Date("1/8/2001",213)),COMVariant::createFromDate(str2Date("1/12/2001",213)),"new"); h = com_Items.AddItem("Task+Rhombus"); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("1/2/2001",213)),COMVariant::createFromDate(str2Date("1/6/2001",213))); com_Items.ItemBar(h,"",51/*exBarFrameColor*/,COMVariant::createFromInt(33554432)); com_Items.AddBar(h,"NewTask",COMVariant::createFromDate(str2Date("1/8/2001",213)),COMVariant::createFromDate(str2Date("1/12/2001",213)),"new"); com_Items.ItemBar(h,"new",51/*exBarFrameColor*/,COMVariant::createFromInt(33554432)); h = com_Items.AddItem("Task/Color+Rhombus"); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("1/2/2001",213)),COMVariant::createFromDate(str2Date("1/6/2001",213))); com_Items.ItemBar(h,"",51/*exBarFrameColor*/,COMVariant::createFromInt(33554687)); com_Items.ItemBar(h,"",33/*exBarColor*/,COMVariant::createFromInt(65280)); com_Items.AddBar(h,"NewTask",COMVariant::createFromDate(str2Date("1/8/2001",213)),COMVariant::createFromDate(str2Date("1/12/2001",213)),"new"); com_Items.ItemBar(h,"new",51/*exBarFrameColor*/,COMVariant::createFromInt(33554687)); com_Items.ItemBar(h,"new",33/*exBarColor*/,COMVariant::createFromInt(65280)); h = com_Items.AddItem("Task/Color+Rhombus/Color"); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("1/2/2001",213)),COMVariant::createFromDate(str2Date("1/6/2001",213))); com_Items.ItemBar(h,"",51/*exBarFrameColor*/,COMVariant::createFromInt(33619712)); com_Items.ItemBar(h,"",33/*exBarColor*/,COMVariant::createFromInt(16711935)); com_Items.AddBar(h,"NewTask",COMVariant::createFromDate(str2Date("1/8/2001",213)),COMVariant::createFromDate(str2Date("1/12/2001",213)),"new"); com_Items.ItemBar(h,"new",51/*exBarFrameColor*/,COMVariant::createFromInt(33619712)); com_Items.ItemBar(h,"new",33/*exBarColor*/,COMVariant::createFromInt(16711935)); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(false,164); } */ |
1731 |
I am using EBN objects to show my bars, but when apply a color to the EBN looks darker. Is it possible to get the same color brightness
public void init() { COM com_Appearance,com_Chart,com_Items; anytype var_Appearance,var_Chart,var_Items; int h; str var_s; ; super(); exg2antt1.BeginUpdate(); var_Appearance = exg2antt1.VisualAppearance(); com_Appearance = var_Appearance; var_s = "gBFLBCJwBAEHhEJAADhABWkIQAAYAQGKIYBkAKBQAGaAoDDWDoMAANAyjPBMKgBBCLAACaKQAD6CYQRhFT7yGAERr/C6EZBGABYJDUMAlCyNQBQSKIYxnAgYY4ACZ5Ij"; var_s = var_s + "qAwLQjQEYzZI0SxJCqQZBBCCSQKkYx0HScRijDILBQwIQmaqjEZoJCiQZfQLCAYRMhkQx9DKTLRtKhYDqubpHUZbdwWRaVYTlM6RLbhGy7YqefJtXLfN4WZgWCz9QLDI"; var_s = var_s + "4wS78JruaqOW5hVz4BasfTrOzLcTzG4HLhCCYBgI"; com_Appearance.Add(1,COMVariant::createFromStr(var_s)); com_Appearance.Add(2,"CP:1 -6 0 0 0"); com_Appearance.RenderType(-16777216); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; /*should be called during the form's activate method*/ com_Chart.PaneWidth(false,164); com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("1/1/2001",213))); exg2antt1.Columns().Add("Column"); var_Items = exg2antt1.Items(); com_Items = var_Items; h = com_Items.AddItem("Task"); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("1/2/2001",213)),COMVariant::createFromDate(str2Date("1/6/2001",213))); h = com_Items.AddItem("Task+Rhombus"); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("1/2/2001",213)),COMVariant::createFromDate(str2Date("1/6/2001",213))); com_Items.ItemBar(h,"",51/*exBarFrameColor*/,COMVariant::createFromInt(33554432)); h = com_Items.AddItem("Task/Color+Rhombus"); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("1/2/2001",213)),COMVariant::createFromDate(str2Date("1/6/2001",213))); com_Items.ItemBar(h,"",51/*exBarFrameColor*/,COMVariant::createFromInt(33554687)); com_Items.ItemBar(h,"",33/*exBarColor*/,COMVariant::createFromInt(65280)); h = com_Items.AddItem("Task/Color+Rhombus/Color"); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("1/2/2001",213)),COMVariant::createFromDate(str2Date("1/6/2001",213))); com_Items.ItemBar(h,"",51/*exBarFrameColor*/,COMVariant::createFromInt(33619712)); com_Items.ItemBar(h,"",33/*exBarColor*/,COMVariant::createFromInt(16711935)); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(false,164); } */ |
1730 |
The ItemBar(exBarColor) changes the color for margins, and there is no exBarStartColor/exBarEndColor. However in my case I would then like do dynamically change the bar color to a different color without changing the start shape color
public void init() { COM com_Appearance,com_Chart,com_Items; anytype var_Appearance,var_Chart,var_Items; int h; str var_s; ; super(); exg2antt1.BeginUpdate(); var_Appearance = exg2antt1.VisualAppearance(); com_Appearance = var_Appearance; var_s = "gBFLBCJwBAEHhEJAADhABWkIQAAYAQGKIYBkAKBQAGaAoDDWDoMAANAyjPBMKgBBCLAACaKQAD6CYQRhFT7yGAERr/C6EZBGABYJDUMAlCyNQBQSKIYxnAgYY4ACZ5Ij"; var_s = var_s + "qAwLQjQEYzZI0SxJCqQZBBCCSQKkYx0HScRijDILBQwIQmaqjEZoJCiQZfQLCAYRMhkQx9DKTLRtKhYDqubpHUZbdwWRaVYTlM6RLbhGy7YqefJtXLfN4WZgWCz9QLDI"; var_s = var_s + "4wS78JruaqOW5hVz4BasfTrOzLcTzG4HLhCCYBgI"; com_Appearance.Add(1,COMVariant::createFromStr(var_s)); com_Appearance.Add(2,"CP:1 -6 0 0 0"); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; /*should be called during the form's activate method*/ com_Chart.PaneWidth(false,164); com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("1/1/2001",213))); exg2antt1.Columns().Add("Column"); var_Items = exg2antt1.Items(); com_Items = var_Items; h = com_Items.AddItem("Task"); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("1/2/2001",213)),COMVariant::createFromDate(str2Date("1/6/2001",213))); h = com_Items.AddItem("Task+Rhombus"); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("1/2/2001",213)),COMVariant::createFromDate(str2Date("1/6/2001",213))); com_Items.ItemBar(h,"",51/*exBarFrameColor*/,COMVariant::createFromInt(33554432)); h = com_Items.AddItem("Task/Color+Rhombus"); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("1/2/2001",213)),COMVariant::createFromDate(str2Date("1/6/2001",213))); com_Items.ItemBar(h,"",51/*exBarFrameColor*/,COMVariant::createFromInt(33554432)); com_Items.ItemBar(h,"",33/*exBarColor*/,COMVariant::createFromInt(65280)); h = com_Items.AddItem("Task/Color+Rhombus/Color"); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("1/2/2001",213)),COMVariant::createFromDate(str2Date("1/6/2001",213))); com_Items.ItemBar(h,"",51/*exBarFrameColor*/,COMVariant::createFromInt(33619712)); com_Items.ItemBar(h,"",33/*exBarColor*/,COMVariant::createFromInt(16711935)); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(false,164); } */ |
1729 |
The ItemBar(exBarColor) changes the color for margins, and there is no exBarStartColor/exBarEndColor. However in my case I would then like do dynamically change the bar color to a different color without changing the end shape color
public void init() { COM com_Appearance,com_Chart,com_Items; anytype var_Appearance,var_Chart,var_Items; int h; str var_s; ; super(); exg2antt1.BeginUpdate(); var_Appearance = exg2antt1.VisualAppearance(); com_Appearance = var_Appearance; var_s = "gBFLBCJwBAEHhEJAADhABXMIQAAYAQGKIYBkAKBQAGaAoDDWDoMAANAyjPBMKgBBCLAACaKQAD6CYQRhFT7yGAERr/C6EQLhGBRQCULQxDCBMIjLJoWhsASVRhnCBBRh"; var_s = var_s + "wAI7ShPUBgXBNCQzICTJJkSJZBiECIJFAaJhnIapZDKGKQWCjAgiNpqGQ2QiKFC2HAcEAxCxGJBoKKZGq2bpJQLbdxUXRVZzpNi7Louay5CrOCZvXxaeAXDa+Az5ODDM"; var_s = var_s + "RwLBcKhzCKDYzfdrZFaWFT3Qi8aCvG6sbw/HZ0OrEEIwCEBA"; com_Appearance.Add(1,COMVariant::createFromStr(var_s)); com_Appearance.Add(2,"CP:1 0 0 6 0"); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; /*should be called during the form's activate method*/ com_Chart.PaneWidth(false,164); com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("1/1/2001",213))); exg2antt1.Columns().Add("Column"); var_Items = exg2antt1.Items(); com_Items = var_Items; h = com_Items.AddItem("Task"); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("1/2/2001",213)),COMVariant::createFromDate(str2Date("1/6/2001",213))); h = com_Items.AddItem("Task+Rhombus"); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("1/2/2001",213)),COMVariant::createFromDate(str2Date("1/6/2001",213))); com_Items.ItemBar(h,"",51/*exBarFrameColor*/,COMVariant::createFromInt(33554432)); h = com_Items.AddItem("Task/Color+Rhombus"); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("1/2/2001",213)),COMVariant::createFromDate(str2Date("1/6/2001",213))); com_Items.ItemBar(h,"",51/*exBarFrameColor*/,COMVariant::createFromInt(33554432)); com_Items.ItemBar(h,"",33/*exBarColor*/,COMVariant::createFromInt(65280)); h = com_Items.AddItem("Task/Color+Rhombus/Color"); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("1/2/2001",213)),COMVariant::createFromDate(str2Date("1/6/2001",213))); com_Items.ItemBar(h,"",51/*exBarFrameColor*/,COMVariant::createFromInt(33619712)); com_Items.ItemBar(h,"",33/*exBarColor*/,COMVariant::createFromInt(16711935)); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(false,164); } */ |
1728 |
Is it possible to resize a column with the mouse without changing the width of the next column
public void init() { ; super(); exg2antt1.BeginUpdate(); exg2antt1.ColumnAutoResize(false); COM::createFromVariant(exg2antt1.Columns().Add("Column 1")).Width(256); COM::createFromVariant(exg2antt1.Columns().Add("Column 2")).Width(512); exg2antt1.DrawGridLines(-1/*exAllLines*/); exg2antt1.EndUpdate(); } |
1727 |
How can I align captions of items with checkbox, with items with no checkbox
public void init() { COM com_Items; anytype var_Items; ; super(); exg2antt1.BeginUpdate(); exg2antt1.Columns().Add("Default"); var_Items = exg2antt1.Items(); com_Items = var_Items; com_Items.CellImages(com_Items.AddItem(COMVariant::createFromInt(0)),COMVariant::createFromInt(0),"1"); com_Items.CellHasCheckBox(com_Items.AddItem(COMVariant::createFromInt(1)),COMVariant::createFromInt(0),true); com_Items.CellImages(com_Items.AddItem(COMVariant::createFromInt(2)),COMVariant::createFromInt(0),"1"); exg2antt1.EndUpdate(); } |
1726 |
How can I show each group header ( not-subroup ), with a different background color, while alternate background colors for inside items
// AddGroupItem event - Occurs after a new Group Item has been inserted to Items collection. void onEvent_AddGroupItem(int _Item) { COM com_Items; anytype var_Items; ; var_Items = exg2antt1.Items(); com_Items = var_Items; com_Items.AddBar(_Item,"Summary",com_Items.CellValue(_Item,COMVariant::createFromInt(2)),com_Items.CellValue(_Item,COMVariant::createFromInt(4))); com_Items.DefineSummaryBars(_Item,"",-3,""); } // AddItem event - Occurs after a new Item has been inserted to Items collection. void onEvent_AddItem(int _Item) { COM com_Items; anytype var_Items; ; var_Items = exg2antt1.Items(); com_Items = var_Items; com_Items.AddBar(_Item,"Task",com_Items.CellValue(_Item,COMVariant::createFromInt(2)),com_Items.CellValue(_Item,COMVariant::createFromInt(4))); } // LayoutChanged event - Occurs when column's position or column's size is changed. void onEvent_LayoutChanged() { ; exg2antt1.Refresh(); } public void init() { COM com_Column,com_Column1,com_ConditionalFormat,com_rs; anytype rs,var_Column,var_Column1,var_ConditionalFormat; ; super(); exg2antt1.BeginUpdate(); exg2antt1.Chart().FirstVisibleDate(COMVariant::createFromDate(str2Date("9/1/1994",213))); /*should be called during the form's activate method*/ exg2antt1.Chart().PaneWidth(false,312); exg2antt1.BackColorSortBar(exg2antt1.BackColor()); exg2antt1.ColumnAutoResize(false); // Add 'Microsoft ActiveX Data Objects 6.1 Library(msado15.dll)' reference to your project. rs = COM::createFromObject(new ADODB.Recordset()); com_rs = rs; rs.Open("Orders","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\\Program Files\\Exontrol\\ExG2antt\\Sample\\Access\\misc.accdb",3/*adOpenStatic*/,3/*adLockOptimistic*/); exg2antt1.DataSource(rs); exg2antt1.Items().AllowCellValueToItemBar(true); var_Column = COM::createFromObject(exg2antt1.Columns()).Item(COMVariant::createFromInt(2)); com_Column = var_Column; com_Column.Def(18/*exCellValueToItemBarProperty*/,COMVariant::createFromInt(1)); var_Column = COM::createFromObject(exg2antt1.Columns()).Item(COMVariant::createFromInt(4)); com_Column = var_Column; com_Column.Def(18/*exCellValueToItemBarProperty*/,COMVariant::createFromInt(2)); exg2antt1.SortBarVisible(true); exg2antt1.SortBarCaption("Drag a <b>column</b> header here to group by that column."); exg2antt1.AllowGroupBy(true); var_Column = COM::createFromObject(exg2antt1.Columns()).Item(COMVariant::createFromInt(1)); com_Column = var_Column; com_Column.SortOrder(1/*SortAscending*/); var_Column = COM::createFromVariant(exg2antt1.Columns().Add("Position")); com_Column = var_Column; com_Column.FormatColumn("(0:= (1 rpos '')) right ( ( 1:= ( =:0 rfind `.` ) ) != -1 ? =:1 : len(=:0))"); com_Column.Visible(false); var_Column1 = COM::createFromVariant(exg2antt1.Columns().Add("Position")); com_Column1 = var_Column1; com_Column1.FormatColumn("(1 rpos '') contains '.'"); com_Column1.Visible(false); var_ConditionalFormat = COM::createFromObject(exg2antt1.ConditionalFormats()).Add("(%C13 mod 2) != 0"); com_ConditionalFormat = var_ConditionalFormat; com_ConditionalFormat.BackColor(WinApi::RGB2int(240,240,240)); var_ConditionalFormat = COM::createFromObject(exg2antt1.ConditionalFormats()).Add("%C14 = 0"); com_ConditionalFormat = var_ConditionalFormat; com_ConditionalFormat.BackColor(WinApi::RGB2int(190,190,190)); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(false,312); } */ |
1725 |
What is the difference between %0 and %C0, when using in expressions ( format, conditional format, computed fields, and so on )
public void init() { COM com_Column,com_Column1,com_Editor,com_Items; anytype var_Column,var_Column1,var_Editor,var_Items; ; super(); exg2antt1.BeginUpdate(); /*should be called during the form's activate method*/ exg2antt1.Chart().PaneWidth(true,0); exg2antt1.HeaderAppearance(4/*Etched*/); exg2antt1.HeaderHeight(24); exg2antt1.ScrollBySingleLine(true); exg2antt1.DrawGridLines(-2/*exRowLines*/); COM::createFromVariant(exg2antt1.Columns().Add("Value")).Def(17/*exCellValueFormat*/,COMVariant::createFromInt(1)); var_Column = COM::createFromVariant(exg2antt1.Columns().Add("FormatColumn = `%0` ~ CellValue")); com_Column = var_Column; com_Column.FormatColumn("%0"); com_Column.Def(16/*exCellSingleLine*/,COMVariant::createFromBoolean(false)); var_Column1 = COM::createFromVariant(exg2antt1.Columns().Add("FormatColumn = `%C0`~ CellCaption")); com_Column1 = var_Column1; com_Column1.FormatColumn("%C0"); com_Column1.Def(16/*exCellSingleLine*/,COMVariant::createFromBoolean(false)); var_Items = exg2antt1.Items(); com_Items = var_Items; com_Items.AddItem(COMVariant::createFromReal(1.1234)); com_Items.CellValueFormat(com_Items.AddItem("<sha ;;0>This <fgcolor=FF0000>is a <s><b>HTM</fgcolor>L</b> text</s>."),COMVariant::createFromInt(0),1/*exHTML*/); var_Editor = com_Items.CellEditor(com_Items.AddItem(COMVariant::createFromInt(3))); com_Editor = var_Editor; com_Editor.EditType(6/*CheckListType*/); com_Editor.AddItem(1,"Border"); com_Editor.AddItem(2,"Thick"); com_Editor.AddItem(4,"Shadow"); com_Items.FormatCell(com_Items.AddItem(COMVariant::createFromInt(10000)),COMVariant::createFromInt(0),"`<b>` + currency(value)"); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(true,0); } */ |
1724 |
How can I alternate colors for each group header ( not-subroup ), with a different background color, while items of the same group showing with a different color
// AddGroupItem event - Occurs after a new Group Item has been inserted to Items collection. void onEvent_AddGroupItem(int _Item) { COM com_Items; anytype var_Items; ; var_Items = exg2antt1.Items(); com_Items = var_Items; com_Items.AddBar(_Item,"Summary",com_Items.CellValue(_Item,COMVariant::createFromInt(2)),com_Items.CellValue(_Item,COMVariant::createFromInt(4))); com_Items.DefineSummaryBars(_Item,"",-3,""); } // AddItem event - Occurs after a new Item has been inserted to Items collection. void onEvent_AddItem(int _Item) { COM com_Items; anytype var_Items; ; var_Items = exg2antt1.Items(); com_Items = var_Items; com_Items.AddBar(_Item,"Task",com_Items.CellValue(_Item,COMVariant::createFromInt(2)),com_Items.CellValue(_Item,COMVariant::createFromInt(4))); } // LayoutChanged event - Occurs when column's position or column's size is changed. void onEvent_LayoutChanged() { ; exg2antt1.Refresh(); } public void init() { COM com_Column,com_Column1,com_ConditionalFormat,com_rs; anytype rs,var_Column,var_Column1,var_ConditionalFormat; ; super(); exg2antt1.BeginUpdate(); exg2antt1.Chart().FirstVisibleDate(COMVariant::createFromDate(str2Date("9/1/1994",213))); /*should be called during the form's activate method*/ exg2antt1.Chart().PaneWidth(false,312); exg2antt1.BackColorSortBar(exg2antt1.BackColor()); exg2antt1.ColumnAutoResize(false); // Add 'Microsoft ActiveX Data Objects 6.1 Library(msado15.dll)' reference to your project. rs = COM::createFromObject(new ADODB.Recordset()); com_rs = rs; rs.Open("Orders","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\\Program Files\\Exontrol\\ExG2antt\\Sample\\Access\\misc.accdb",3/*adOpenStatic*/,3/*adLockOptimistic*/); exg2antt1.DataSource(rs); exg2antt1.Items().AllowCellValueToItemBar(true); var_Column = COM::createFromObject(exg2antt1.Columns()).Item(COMVariant::createFromInt(2)); com_Column = var_Column; com_Column.Def(18/*exCellValueToItemBarProperty*/,COMVariant::createFromInt(1)); var_Column = COM::createFromObject(exg2antt1.Columns()).Item(COMVariant::createFromInt(4)); com_Column = var_Column; com_Column.Def(18/*exCellValueToItemBarProperty*/,COMVariant::createFromInt(2)); exg2antt1.SortBarVisible(true); exg2antt1.SortBarCaption("Drag a <b>column</b> header here to group by that column."); exg2antt1.AllowGroupBy(true); var_Column = COM::createFromObject(exg2antt1.Columns()).Item(COMVariant::createFromInt(1)); com_Column = var_Column; com_Column.SortOrder(1/*SortAscending*/); var_Column = COM::createFromVariant(exg2antt1.Columns().Add("Position")); com_Column = var_Column; com_Column.FormatColumn("(0:= (1 rpos '')) left ( ( 1:= ( =:0 lfind `.` ) ) != -1 ? =:1 : len(=:0))"); com_Column.Visible(false); var_Column1 = COM::createFromVariant(exg2antt1.Columns().Add("Position")); com_Column1 = var_Column1; com_Column1.FormatColumn("(1 rpos '') contains '.'"); com_Column1.Visible(false); var_ConditionalFormat = COM::createFromObject(exg2antt1.ConditionalFormats()).Add("(%C13 mod 2) != 0"); com_ConditionalFormat = var_ConditionalFormat; com_ConditionalFormat.BackColor(WinApi::RGB2int(240,240,240)); var_ConditionalFormat = COM::createFromObject(exg2antt1.ConditionalFormats()).Add("%C14 = 0"); com_ConditionalFormat = var_ConditionalFormat; com_ConditionalFormat.BackColor(WinApi::RGB2int(190,190,190)); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(false,312); } */ |
1723 |
How can I highlight each group header, with a different background color (method 2)
|
1722 |
How can I highlight each group header ( not-subroup ), with a different background color (method 1)
// AddGroupItem event - Occurs after a new Group Item has been inserted to Items collection. void onEvent_AddGroupItem(int _Item) { COM com_Items; anytype var_Items; ; var_Items = exg2antt1.Items(); com_Items = var_Items; com_Items.AddBar(_Item,"Summary",com_Items.CellValue(_Item,COMVariant::createFromInt(2)),com_Items.CellValue(_Item,COMVariant::createFromInt(4))); com_Items.DefineSummaryBars(_Item,"",-3,""); } // AddItem event - Occurs after a new Item has been inserted to Items collection. void onEvent_AddItem(int _Item) { COM com_Items; anytype var_Items; ; var_Items = exg2antt1.Items(); com_Items = var_Items; com_Items.AddBar(_Item,"Task",com_Items.CellValue(_Item,COMVariant::createFromInt(2)),com_Items.CellValue(_Item,COMVariant::createFromInt(4))); } // LayoutChanged event - Occurs when column's position or column's size is changed. void onEvent_LayoutChanged() { ; exg2antt1.Refresh(); } public void init() { COM com_Column,com_Column1,com_ConditionalFormat,com_rs; anytype rs,var_Column,var_Column1,var_ConditionalFormat; ; super(); exg2antt1.BeginUpdate(); exg2antt1.Chart().FirstVisibleDate(COMVariant::createFromDate(str2Date("9/1/1994",213))); /*should be called during the form's activate method*/ exg2antt1.Chart().PaneWidth(false,312); exg2antt1.BackColorSortBar(exg2antt1.BackColor()); exg2antt1.ColumnAutoResize(false); // Add 'Microsoft ActiveX Data Objects 6.1 Library(msado15.dll)' reference to your project. rs = COM::createFromObject(new ADODB.Recordset()); com_rs = rs; rs.Open("Orders","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\\Program Files\\Exontrol\\ExG2antt\\Sample\\Access\\misc.accdb",3/*adOpenStatic*/,3/*adLockOptimistic*/); exg2antt1.DataSource(rs); exg2antt1.Items().AllowCellValueToItemBar(true); var_Column = COM::createFromObject(exg2antt1.Columns()).Item(COMVariant::createFromInt(2)); com_Column = var_Column; com_Column.Def(18/*exCellValueToItemBarProperty*/,COMVariant::createFromInt(1)); var_Column = COM::createFromObject(exg2antt1.Columns()).Item(COMVariant::createFromInt(4)); com_Column = var_Column; com_Column.Def(18/*exCellValueToItemBarProperty*/,COMVariant::createFromInt(2)); exg2antt1.SortBarVisible(true); exg2antt1.SortBarCaption("Drag a <b>column</b> header here to group by that column."); exg2antt1.AllowGroupBy(true); var_Column = COM::createFromObject(exg2antt1.Columns()).Item(COMVariant::createFromInt(1)); com_Column = var_Column; com_Column.SortOrder(1/*SortAscending*/); var_Column = COM::createFromVariant(exg2antt1.Columns().Add("Position")); com_Column = var_Column; com_Column.FormatColumn("(0:= (1 rpos '')) left ( ( 1:= ( =:0 lfind `.` ) ) != -1 ? =:1 : len(=:0))"); com_Column.Visible(false); var_Column1 = COM::createFromVariant(exg2antt1.Columns().Add("Position")); com_Column1 = var_Column1; com_Column1.FormatColumn("(1 rpos '') contains '.'"); com_Column1.Visible(false); var_ConditionalFormat = COM::createFromObject(exg2antt1.ConditionalFormats()).Add("%C14 = 0"); com_ConditionalFormat = var_ConditionalFormat; com_ConditionalFormat.BackColor(WinApi::RGB2int(190,190,190)); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(false,312); } */ |
1721 |
The BackColorAlternate displays each second row with a different background color. Is it possible to apply a different background color, for each sub-tree, ConditionalFormats, Add
// LayoutChanged event - Occurs when column's position or column's size is changed. void onEvent_LayoutChanged() { ; exg2antt1.Refresh(); } // Sort event - Fired when the control sorts a column. void onEvent_Sort() { ; exg2antt1.Refresh(); } public void init() { COM com_Column,com_Column1,com_Column2,com_ConditionalFormat,com_Items; anytype var_Column,var_Column1,var_Column2,var_ConditionalFormat,var_Items; int h; ; super(); exg2antt1.BeginUpdate(); exg2antt1.LinesAtRoot(-1/*exLinesAtRoot*/); var_Column = COM::createFromVariant(exg2antt1.Columns().Add("P1")); com_Column = var_Column; com_Column.Def(0/*exCellHasCheckBox*/,COMVariant::createFromBoolean(true)); com_Column.PartialCheck(true); /*should be called during the form's activate method*/ exg2antt1.Chart().PaneWidth(true,0); var_Column1 = COM::createFromVariant(exg2antt1.Columns().Add("P2")); com_Column1 = var_Column1; com_Column1.Def(0/*exCellHasCheckBox*/,COMVariant::createFromBoolean(true)); com_Column1.PartialCheck(true); var_Items = exg2antt1.Items(); com_Items = var_Items; h = com_Items.AddItem("Root 1"); com_Items.InsertItem(h,,"Child 1"); com_Items.InsertItem(h,,"Child 2"); com_Items.ExpandItem(h,true); h = com_Items.AddItem("Root 2"); com_Items.InsertItem(h,,"Child 1"); com_Items.InsertItem(h,,"Child 2"); com_Items.ExpandItem(h,true); h = com_Items.AddItem("Root 2"); com_Items.InsertItem(h,,"Child 1"); com_Items.InsertItem(h,,"Child 2"); com_Items.ExpandItem(h,true); var_Column2 = COM::createFromVariant(exg2antt1.Columns().Add("Position")); com_Column2 = var_Column2; com_Column2.FormatColumn("(0:= (1 rpos '')) left ( ( 1:= ( =:0 lfind `.` ) ) != -1 ? =:1 : len(=:0))"); com_Column2.Visible(false); var_ConditionalFormat = COM::createFromObject(exg2antt1.ConditionalFormats()).Add("(%C2 mod 2) != 0"); com_ConditionalFormat = var_ConditionalFormat; com_ConditionalFormat.BackColor(WinApi::RGB2int(240,240,240)); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(true,0); } */ |
1720 |
The BackColorAlternate displays each second row with a different background color. Is it possible to apply a different background color, for 2nd, 3rd, 4th, row, and so on
// AddItem event - Occurs after a new Item has been inserted to Items collection. void onEvent_AddItem(int _Item) { COM com_Items; anytype var_Items; ; var_Items = exg2antt1.Items(); com_Items = var_Items; com_Items.AddBar(_Item,"Task",com_Items.CellValue(_Item,COMVariant::createFromInt(2)),com_Items.CellValue(_Item,COMVariant::createFromInt(4))); } // LayoutChanged event - Occurs when column's position or column's size is changed. void onEvent_LayoutChanged() { ; exg2antt1.Refresh(); } public void init() { COM com_Column,com_ConditionalFormat,com_rs; anytype rs,var_Column,var_ConditionalFormat; ; super(); exg2antt1.BeginUpdate(); exg2antt1.Chart().FirstVisibleDate(COMVariant::createFromDate(str2Date("9/1/1994",213))); /*should be called during the form's activate method*/ exg2antt1.Chart().PaneWidth(false,312); exg2antt1.ColumnAutoResize(false); // Add 'Microsoft ActiveX Data Objects 6.1 Library(msado15.dll)' reference to your project. rs = COM::createFromObject(new ADODB.Recordset()); com_rs = rs; rs.Open("Orders","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\\Program Files\\Exontrol\\ExG2antt\\Sample\\Access\\misc.accdb",3/*adOpenStatic*/,3/*adLockOptimistic*/); exg2antt1.DataSource(rs); exg2antt1.Items().AllowCellValueToItemBar(true); var_Column = COM::createFromObject(exg2antt1.Columns()).Item(COMVariant::createFromInt(2)); com_Column = var_Column; com_Column.Def(18/*exCellValueToItemBarProperty*/,COMVariant::createFromInt(1)); var_Column = COM::createFromObject(exg2antt1.Columns()).Item(COMVariant::createFromInt(4)); com_Column = var_Column; com_Column.Def(18/*exCellValueToItemBarProperty*/,COMVariant::createFromInt(2)); var_Column = COM::createFromObject(exg2antt1.Columns()).Item(COMVariant::createFromInt(1)); com_Column = var_Column; com_Column.SortOrder(1/*SortAscending*/); var_Column = COM::createFromVariant(exg2antt1.Columns().Add("Position")); com_Column = var_Column; com_Column.FormatColumn("1 apos ''"); com_Column.Visible(false); var_ConditionalFormat = COM::createFromObject(exg2antt1.ConditionalFormats()).Add("(%C13 mod 5) = 1"); com_ConditionalFormat = var_ConditionalFormat; com_ConditionalFormat.BackColor(WinApi::RGB2int(128,128,128)); var_ConditionalFormat = COM::createFromObject(exg2antt1.ConditionalFormats()).Add("(%C13 mod 5) = 2"); com_ConditionalFormat = var_ConditionalFormat; com_ConditionalFormat.BackColor(WinApi::RGB2int(164,164,164)); var_ConditionalFormat = COM::createFromObject(exg2antt1.ConditionalFormats()).Add("(%C13 mod 5) = 3"); com_ConditionalFormat = var_ConditionalFormat; com_ConditionalFormat.BackColor(WinApi::RGB2int(190,190,190)); var_ConditionalFormat = COM::createFromObject(exg2antt1.ConditionalFormats()).Add("(%C13 mod 5) = 4"); com_ConditionalFormat = var_ConditionalFormat; com_ConditionalFormat.BackColor(WinApi::RGB2int(240,240,240)); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(false,312); } */ |
1719 |
The BackColorAlternate displays each second row with a different background color. The question I have it is possible to apply a different background color for 3rd, 4th, row, and so on
// AddItem event - Occurs after a new Item has been inserted to Items collection. void onEvent_AddItem(int _Item) { COM com_Items; anytype var_Items; ; var_Items = exg2antt1.Items(); com_Items = var_Items; com_Items.AddBar(_Item,"Task",com_Items.CellValue(_Item,COMVariant::createFromInt(2)),com_Items.CellValue(_Item,COMVariant::createFromInt(4))); } // LayoutChanged event - Occurs when column's position or column's size is changed. void onEvent_LayoutChanged() { ; exg2antt1.Refresh(); } public void init() { COM com_Column,com_ConditionalFormat,com_rs; anytype rs,var_Column,var_ConditionalFormat; ; super(); exg2antt1.BeginUpdate(); exg2antt1.Chart().FirstVisibleDate(COMVariant::createFromDate(str2Date("9/1/1994",213))); /*should be called during the form's activate method*/ exg2antt1.Chart().PaneWidth(false,312); exg2antt1.ColumnAutoResize(false); // Add 'Microsoft ActiveX Data Objects 6.1 Library(msado15.dll)' reference to your project. rs = COM::createFromObject(new ADODB.Recordset()); com_rs = rs; rs.Open("Orders","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\\Program Files\\Exontrol\\ExG2antt\\Sample\\Access\\misc.accdb",3/*adOpenStatic*/,3/*adLockOptimistic*/); exg2antt1.DataSource(rs); exg2antt1.Items().AllowCellValueToItemBar(true); var_Column = COM::createFromObject(exg2antt1.Columns()).Item(COMVariant::createFromInt(2)); com_Column = var_Column; com_Column.Def(18/*exCellValueToItemBarProperty*/,COMVariant::createFromInt(1)); var_Column = COM::createFromObject(exg2antt1.Columns()).Item(COMVariant::createFromInt(4)); com_Column = var_Column; com_Column.Def(18/*exCellValueToItemBarProperty*/,COMVariant::createFromInt(2)); var_Column = COM::createFromObject(exg2antt1.Columns()).Item(COMVariant::createFromInt(1)); com_Column = var_Column; com_Column.SortOrder(1/*SortAscending*/); var_Column = COM::createFromVariant(exg2antt1.Columns().Add("Position")); com_Column = var_Column; com_Column.FormatColumn("1 apos ''"); com_Column.Visible(false); var_ConditionalFormat = COM::createFromObject(exg2antt1.ConditionalFormats()).Add("(%C13 mod 4) = 0"); com_ConditionalFormat = var_ConditionalFormat; com_ConditionalFormat.BackColor(WinApi::RGB2int(240,240,240)); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(false,312); } */ |
1718 |
The BackColorAlternate looks fine for flat tables, but how about using it when displaying a hierarchy/tree, like grouping rows. The sample alternate colors for each group found
// AddGroupItem event - Occurs after a new Group Item has been inserted to Items collection. void onEvent_AddGroupItem(int _Item) { COM com_Items; anytype var_Items; ; var_Items = exg2antt1.Items(); com_Items = var_Items; com_Items.AddBar(_Item,"Summary",com_Items.CellValue(_Item,COMVariant::createFromInt(2)),com_Items.CellValue(_Item,COMVariant::createFromInt(4))); com_Items.DefineSummaryBars(_Item,"",-3,""); } // AddItem event - Occurs after a new Item has been inserted to Items collection. void onEvent_AddItem(int _Item) { COM com_Items; anytype var_Items; ; var_Items = exg2antt1.Items(); com_Items = var_Items; com_Items.AddBar(_Item,"Task",com_Items.CellValue(_Item,COMVariant::createFromInt(2)),com_Items.CellValue(_Item,COMVariant::createFromInt(4))); } // LayoutChanged event - Occurs when column's position or column's size is changed. void onEvent_LayoutChanged() { ; exg2antt1.Refresh(); } public void init() { COM com_Column,com_ConditionalFormat,com_rs; anytype rs,var_Column,var_ConditionalFormat; ; super(); exg2antt1.BeginUpdate(); exg2antt1.Chart().FirstVisibleDate(COMVariant::createFromDate(str2Date("9/1/1994",213))); /*should be called during the form's activate method*/ exg2antt1.Chart().PaneWidth(false,312); exg2antt1.BackColorSortBar(exg2antt1.BackColor()); exg2antt1.ColumnAutoResize(false); // Add 'Microsoft ActiveX Data Objects 6.1 Library(msado15.dll)' reference to your project. rs = COM::createFromObject(new ADODB.Recordset()); com_rs = rs; rs.Open("Orders","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\\Program Files\\Exontrol\\ExG2antt\\Sample\\Access\\misc.accdb",3/*adOpenStatic*/,3/*adLockOptimistic*/); exg2antt1.DataSource(rs); exg2antt1.Items().AllowCellValueToItemBar(true); var_Column = COM::createFromObject(exg2antt1.Columns()).Item(COMVariant::createFromInt(2)); com_Column = var_Column; com_Column.Def(18/*exCellValueToItemBarProperty*/,COMVariant::createFromInt(1)); var_Column = COM::createFromObject(exg2antt1.Columns()).Item(COMVariant::createFromInt(4)); com_Column = var_Column; com_Column.Def(18/*exCellValueToItemBarProperty*/,COMVariant::createFromInt(2)); exg2antt1.SortBarVisible(true); exg2antt1.SortBarCaption("Drag a <b>column</b> header here to group by that column."); exg2antt1.AllowGroupBy(true); var_Column = COM::createFromObject(exg2antt1.Columns()).Item(COMVariant::createFromInt(1)); com_Column = var_Column; com_Column.SortOrder(1/*SortAscending*/); var_Column = COM::createFromVariant(exg2antt1.Columns().Add("Position")); com_Column = var_Column; com_Column.FormatColumn("(0:= (1 rpos '')) left ( ( 1:= ( =:0 lfind `.` ) ) != -1 ? =:1 : len(=:0))"); com_Column.Visible(false); var_ConditionalFormat = COM::createFromObject(exg2antt1.ConditionalFormats()).Add("(%C13 mod 2) != 0"); com_ConditionalFormat = var_ConditionalFormat; com_ConditionalFormat.BackColor(WinApi::RGB2int(240,240,240)); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(false,312); } */ |
1717 |
How do I show the chart's labels in 24-hour clock format
public void init() { COM com_Chart,com_Level,com_Level1,com_Level2; anytype var_Chart,var_Level,var_Level1,var_Level2; ; super(); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; /*should be called during the form's activate method*/ com_Chart.PaneWidth(false,0); com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("1/1/2001",213))); com_Chart.LevelCount(3); var_Level = com_Chart.Level(0); com_Level = var_Level; com_Level.Label("<%mmm%> <%d%>, <%yyyy%>"); com_Level.Alignment(17/*exHOutside | CenterAlignment*/); com_Level.Unit(4096/*exDay*/); var_Level1 = com_Chart.Level(1); com_Level1 = var_Level1; com_Level1.Label("<b><%h%>:00</b>"); com_Level1.Alignment(1/*CenterAlignment*/); com_Level1.Unit(65536/*exHour*/); com_Level1.DrawTickLines(true); com_Level1.DrawGridLines(true); var_Level2 = com_Chart.Level(2); com_Level2 = var_Level2; com_Level2.Label("<%nn%>"); com_Level2.Unit(1048576/*exMinute*/); com_Level2.Count(15); com_Chart.ScrollTo(str2Datetime("1/1/2001 8:30:00",213),COMVariant::createFromInt(0)); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(false,0); } */ |
1716 |
How do I show the chart's labels in 12-hour clock format
public void init() { COM com_Chart,com_Level,com_Level1,com_Level2; anytype var_Chart,var_Level,var_Level1,var_Level2; ; super(); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; /*should be called during the form's activate method*/ com_Chart.PaneWidth(false,0); com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("1/1/2001",213))); com_Chart.LevelCount(3); var_Level = com_Chart.Level(0); com_Level = var_Level; com_Level.Label("<%mmm%> <%d%>, <%yyyy%>"); com_Level.Alignment(17/*exHOutside | CenterAlignment*/); com_Level.Unit(4096/*exDay*/); var_Level1 = com_Chart.Level(1); com_Level1 = var_Level1; com_Level1.Label("<b><%h%>:00</b> <%AM/PM%>"); com_Level1.Alignment(1/*CenterAlignment*/); com_Level1.Unit(65536/*exHour*/); com_Level1.DrawTickLines(true); com_Level1.DrawGridLines(true); var_Level2 = com_Chart.Level(2); com_Level2 = var_Level2; com_Level2.Label("<%nn%>"); com_Level2.Unit(1048576/*exMinute*/); com_Level2.Count(15); com_Chart.ScrollTo(str2Datetime("1/1/2001 8:30:00",213),COMVariant::createFromInt(0)); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(false,0); } */ |
1715 |
I would like to avoid manual typing in the date-cell because user often type wrong things (no decimal points and so on) and so the todays-date is generated for the cell. What can be done
// KeyPress event - Occurs when the user presses and releases an ANSI key. void onEvent_KeyPress(COMVariant /*short*/ _KeyAscii) { ; print( "if .Editying != 0 then" ); print( exg2antt1.Editing() ); _KeyAscii = 0; } public void init() { COM com_Chart,com_Column,com_Column1,com_Columns,com_Editor,com_Items; anytype var_Chart,var_Column,var_Column1,var_Columns,var_Editor,var_Items; ; super(); exg2antt1.BeginUpdate(); var_Columns = exg2antt1.Columns(); com_Columns = var_Columns; com_Columns.Add("Tasks"); var_Column = COM::createFromVariant(com_Columns.Add("Start")); com_Column = var_Column; com_Column.Def(18/*exCellValueToItemBarProperty*/,COMVariant::createFromInt(1)); var_Editor = COM::createFromObject(com_Column.Editor()); com_Editor = var_Editor; com_Editor.EditType(7/*DateType*/); var_Column1 = COM::createFromVariant(com_Columns.Add("End")); com_Column1 = var_Column1; com_Column1.Def(18/*exCellValueToItemBarProperty*/,COMVariant::createFromInt(2)); var_Editor = COM::createFromObject(com_Column1.Editor()); com_Editor = var_Editor; com_Editor.EditType(7/*DateType*/); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("9/20/2006",213))); com_Chart.AllowLinkBars(true); com_Chart.AllowCreateBar(0/*exNoCreateBar*/); com_Chart.LevelCount(2); /*should be called during the form's activate method*/ com_Chart.PaneWidth(0,196); var_Items = exg2antt1.Items(); com_Items = var_Items; com_Items.AllowCellValueToItemBar(true); com_Items.AddBar(com_Items.AddItem("Task 1"),"Task",COMVariant::createFromDate(str2Date("9/21/2006",213)),COMVariant::createFromDate(str2Date("9/24/2006",213))); com_Items.AddBar(com_Items.AddItem("Task 2"),"Task",COMVariant::createFromDate(str2Date("9/22/2006",213)),COMVariant::createFromDate(str2Date("9/25/2006",213))); com_Items.AddBar(com_Items.AddItem("Task 3"),"Task",COMVariant::createFromDate(str2Date("9/23/2006",213)),COMVariant::createFromDate(str2Date("9/26/2006",213))); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(0,196); } */ |
1714 |
When a Day, Week etc is clicked how can we make it centre/zoom the chart to cover all the bars
// OverviewZoom event - Occurs once the user selects a new time scale unit in the overview zoom area. void onEvent_OverviewZoom() { COM com_Chart; anytype var_Chart; ; var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; com_Chart.ScrollTo(str2Date("1/1/2001",213),COMVariant::createFromInt(1)); print( "Start" ); print( com_Chart.StartPrintDate() ); print( "End" ); print( com_Chart.EndPrintDate() ); } public void init() { COM com_Chart,com_Items; anytype var_Chart,var_Items; ; super(); exg2antt1.BeginUpdate(); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; /*should be called during the form's activate method*/ com_Chart.PaneWidth(false,128); com_Chart.LevelCount(2); com_Chart.OverviewVisible(2/*exOverviewShowAllVisible*/); com_Chart.AllowOverviewZoom(1/*exAlwaysZoom*/); com_Chart.Label(16777216/*exSecond*/,""); com_Chart.Label(1048576/*exMinute*/,""); com_Chart.Label(65536/*exHour*/,""); com_Chart.UnitScale(4096/*exDay*/); com_Chart.ScrollTo(str2Date("1/1/2001",213),COMVariant::createFromInt(1)); com_Chart.MarkTimeZone("zone",COMVariant::createFromDate(str2Date("1/1/2001",213)),COMVariant::createFromDate(str2Date("1/2/2001",213)),COMVariant::createFromInt(10516548)); exg2antt1.Columns().Add("Default"); var_Items = exg2antt1.Items(); com_Items = var_Items; com_Items.AddBar(com_Items.AddItem("Item 1"),"Task",COMVariant::createFromDate(str2Date("12/15/2000",213)),COMVariant::createFromDate(str2Date("1/10/2001",213))); com_Items.AddBar(com_Items.AddItem("Item 2"),"Task",COMVariant::createFromDate(str2Date("1/1/2001",213)),COMVariant::createFromDate(str2Date("1/5/2001",213))); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(false,128); } */ |
1713 |
The first time we run the application, the day label headers looks different then pressing Week and then Day again on the control's overview part. How do we make to show the header in the same format
public void init() { COM com_Chart; anytype var_Chart; ; super(); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; /*should be called during the form's activate method*/ com_Chart.PaneWidth(false,128); com_Chart.LevelCount(2); com_Chart.OverviewVisible(2/*exOverviewShowAllVisible*/); com_Chart.AllowOverviewZoom(1/*exAlwaysZoom*/); com_Chart.Label(16777216/*exSecond*/,""); com_Chart.Label(1048576/*exMinute*/,""); com_Chart.Label(65536/*exHour*/,""); com_Chart.UnitScale(4096/*exDay*/); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(false,128); } */ |
1712 |
How to sort numerically by columns
public void init() { COM com_Column,com_Items; anytype var_Column,var_Items; ; super(); exg2antt1.BeginUpdate(); COM::createFromVariant(exg2antt1.Columns().Add("Numeric")).SortType(1/*SortNumeric*/); var_Items = exg2antt1.Items(); com_Items = var_Items; com_Items.AddItem(COMVariant::createFromInt(1)); com_Items.AddItem(COMVariant::createFromInt(2)); com_Items.AddItem(COMVariant::createFromInt(12)); com_Items.AddItem(COMVariant::createFromInt(22)); var_Column = COM::createFromObject(exg2antt1.Columns()).Item(COMVariant::createFromInt(0)); com_Column = var_Column; com_Column.SortOrder(1/*SortAscending*/); exg2antt1.EndUpdate(); } |
1711 |
The control does not ensure the item to fit the control's client area once the user clicks the cell's button or check box. What can be done
// MouseDown event - Occurs when the user presses a mouse button. void onEvent_MouseDown(int _Button,int _Shift,int _X,int _Y) { // Items.EnsureVisibleItem(ItemFromPoint(-1,-1,c,hit)) ; } public void init() { COM com_Column,com_Items; anytype var_Column,var_Items; ; super(); exg2antt1.BeginUpdate(); exg2antt1.TreeColumnIndex(-1); exg2antt1.SelForeColor(exg2antt1.ForeColor()); var_Column = COM::createFromVariant(exg2antt1.Columns().Add("Buttons")); com_Column = var_Column; com_Column.Alignment(1/*CenterAlignment*/); com_Column.Def(2/*exCellHasButton*/,COMVariant::createFromBoolean(true)); var_Items = exg2antt1.Items(); com_Items = var_Items; com_Items.AddItem("Button A"); com_Items.AddItem("Button B"); com_Items.AddItem("Button C"); exg2antt1.EndUpdate(); } |
1710 |
How do I arrange the levels when the user changes the scale using the control's overview part
// OverviewZoom event - Occurs once the user selects a new time scale unit in the overview zoom area. void onEvent_OverviewZoom() { COM com_Chart,com_Level; anytype var_Chart,var_Level; ; print( exg2antt1.Chart().UnitScale() ); exg2antt1.EnsureVisibleColumn(COMVariant::createFromInt(0)); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; var_Level = COM::createFromObject(com_Chart.Level(0)); com_Level = var_Level; com_Level.DrawTickLines(0/*exLevelNoLine*/); com_Chart.ScrollTo(str2Date("11/18/2015",213),COMVariant::createFromInt(1)); } public void init() { COM com_Chart,com_Level,com_Level1; anytype var_Chart,var_Level,var_Level1; ; super(); exg2antt1.BeginUpdate(); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("11/18/2015",213))); /*should be called during the form's activate method*/ com_Chart.PaneWidth(false,0); com_Chart.LevelCount(2); com_Chart.DrawLevelSeparator(2/*exLevelSolidLine*/); var_Level = com_Chart.Level(0); com_Level = var_Level; com_Level.Alignment(17/*exHOutside | CenterAlignment*/); com_Level.DrawTickLines(2/*exLevelSolidLine*/); com_Level.BackColor(exg2antt1.BackColor()); var_Level1 = com_Chart.Level(1); com_Level1 = var_Level1; com_Level1.DrawTickLines(65/*exLevelMiddleLine | exLevelDotLine*/); com_Level1.DrawTickLinesFrom(0,2/*exLevelSolidLine*/); com_Chart.OverviewVisible(2/*exOverviewShowAllVisible*/); com_Chart.AllowOverviewZoom(1/*exAlwaysZoom*/); com_Chart.UnitWidth(24); com_Chart.Label(16777216/*exSecond*/,""); com_Chart.Label(1048576/*exMinute*/,""); com_Chart.Label(65536/*exHour*/,""); com_Chart.Label(256/*exWeek*/,""); com_Chart.Label(4096/*exDay*/,"<|><%d%><|><%d3%>, <%m3%> <%d%>, '<%yy%><|><%dddd%>, <%mmmm%> <%d%>, <%yyyy%><||><||>4096"); com_Chart.UnitScale(4096/*exDay*/); com_Chart.ScrollTo(com_Chart.FirstVisibleDate(),COMVariant::createFromInt(1)); exg2antt1.Columns().Add("Default"); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(false,0); } */ |
1709 |
I am using AllowGroupBy, the question is it is possible to add summary bars for child item, when user do grouping
// AddGroupItem event - Occurs after a new Group Item has been inserted to Items collection. void onEvent_AddGroupItem(int _Item) { COM com_Items; anytype var_Items; ; var_Items = exg2antt1.Items(); com_Items = var_Items; com_Items.AddBar(_Item,"Summary",com_Items.CellValue(_Item,COMVariant::createFromInt(2)),com_Items.CellValue(_Item,COMVariant::createFromInt(4))); com_Items.DefineSummaryBars(_Item,"",-3,""); } // AddItem event - Occurs after a new Item has been inserted to Items collection. void onEvent_AddItem(int _Item) { COM com_Items; anytype var_Items; ; var_Items = exg2antt1.Items(); com_Items = var_Items; com_Items.AddBar(_Item,"Task",com_Items.CellValue(_Item,COMVariant::createFromInt(2)),com_Items.CellValue(_Item,COMVariant::createFromInt(4))); } public void init() { COM com_Column,com_Items,com_rs; anytype rs,var_Column,var_Items; ; super(); exg2antt1.BeginUpdate(); exg2antt1.Chart().FirstVisibleDate(COMVariant::createFromDate(str2Date("9/1/1994",213))); exg2antt1.BackColorSortBar(exg2antt1.BackColor()); exg2antt1.ColumnAutoResize(false); // Add 'Microsoft ActiveX Data Objects 6.1 Library(msado15.dll)' reference to your project. rs = COM::createFromObject(new ADODB.Recordset()); com_rs = rs; rs.Open("Orders","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\\Program Files\\Exontrol\\ExG2antt\\Sample\\Access\\misc.accdb",3/*adOpenStatic*/,3/*adLockOptimistic*/); exg2antt1.DataSource(rs); exg2antt1.SortBarVisible(true); exg2antt1.SortBarCaption("Drag a <b>column</b> header here to group by that column."); exg2antt1.AllowGroupBy(true); var_Column = COM::createFromObject(exg2antt1.Columns()).Item(COMVariant::createFromInt(1)); com_Column = var_Column; com_Column.SortOrder(1/*SortAscending*/); exg2antt1.EndUpdate(); } |
1708 |
I noticed that when grouping on a field, its details are always expanded. Is it possible to show collapsed by default (method 3)
|
1707 |
I noticed that when grouping on a field, its details are always expanded. Is it possible to show collapsed by default (method 2)
// AddItem event - Occurs after a new Item has been inserted to Items collection. void onEvent_AddItem(int _Item) { COM com_Items; anytype var_Items; ; var_Items = exg2antt1.Items(); com_Items = var_Items; com_Items.AddBar(_Item,"Task",com_Items.CellValue(_Item,COMVariant::createFromInt(2)),com_Items.CellValue(_Item,COMVariant::createFromInt(4))); } public void init() { COM com_Column,com_Items,com_rs; anytype rs,var_Column,var_Items; ; super(); exg2antt1.BeginUpdate(); exg2antt1.Chart().FirstVisibleDate(COMVariant::createFromDate(str2Date("9/1/1994",213))); exg2antt1.BackColorSortBar(exg2antt1.BackColor()); exg2antt1.ColumnAutoResize(false); // Add 'Microsoft ActiveX Data Objects 6.1 Library(msado15.dll)' reference to your project. rs = COM::createFromObject(new ADODB.Recordset()); com_rs = rs; rs.Open("Orders","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\\Program Files\\Exontrol\\ExG2antt\\Sample\\Access\\misc.accdb",3/*adOpenStatic*/,3/*adLockOptimistic*/); exg2antt1.DataSource(rs); exg2antt1.SortBarVisible(true); exg2antt1.SortBarCaption("Drag a <b>column</b> header here to group by that column."); exg2antt1.AllowGroupBy(true); var_Column = COM::createFromObject(exg2antt1.Columns()).Item(COMVariant::createFromInt(1)); com_Column = var_Column; com_Column.SortOrder(1/*SortAscending*/); exg2antt1.EndUpdate(); exg2antt1.BeginUpdate(); exg2antt1.EnsureVisibleColumn(COMVariant::createFromInt(0)); exg2antt1.Items().ExpandItem(0,false); exg2antt1.EndUpdate(); } |
1706 |
I noticed that when grouping on a field, its details are always expanded. Is it possible to show collapsed by default (method 1)
|
1705 |
Is there a possibility to expand / collapse all groups (or group by group) at runtime with a method (equivalent to pressing the + or - button in the group header)
// AddItem event - Occurs after a new Item has been inserted to Items collection. void onEvent_AddItem(int _Item) { COM com_Items; anytype var_Items; ; var_Items = exg2antt1.Items(); com_Items = var_Items; com_Items.AddBar(_Item,"Task",com_Items.CellValue(_Item,COMVariant::createFromInt(2)),com_Items.CellValue(_Item,COMVariant::createFromInt(4))); } public void init() { COM com_Column,com_Items,com_rs; anytype rs,var_Column,var_Items; ; super(); exg2antt1.BeginUpdate(); exg2antt1.Chart().FirstVisibleDate(COMVariant::createFromDate(str2Date("9/1/1994",213))); exg2antt1.BackColorSortBar(exg2antt1.BackColor()); exg2antt1.ColumnAutoResize(false); // Add 'Microsoft ActiveX Data Objects 6.1 Library(msado15.dll)' reference to your project. rs = COM::createFromObject(new ADODB.Recordset()); com_rs = rs; rs.Open("Orders","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\\Program Files\\Exontrol\\ExG2antt\\Sample\\Access\\misc.accdb",3/*adOpenStatic*/,3/*adLockOptimistic*/); exg2antt1.DataSource(rs); exg2antt1.SortBarVisible(true); exg2antt1.SortBarCaption("Drag a <b>column</b> header here to group by that column."); exg2antt1.AllowGroupBy(true); var_Column = COM::createFromObject(exg2antt1.Columns()).Item(COMVariant::createFromInt(1)); com_Column = var_Column; com_Column.SortOrder(1/*SortAscending*/); exg2antt1.EndUpdate(); exg2antt1.EnsureVisibleColumn(COMVariant::createFromInt(0)); exg2antt1.BeginUpdate(); var_Items = exg2antt1.Items(); com_Items = var_Items; com_Items.ExpandItem(com_Items.RootItem(0),false); com_Items.ExpandItem(com_Items.RootItem(1),false); com_Items.ExpandItem(com_Items.RootItem(2),false); exg2antt1.EndUpdate(); } |
1704 |
Is there a possibility to expand / collapse all groups (or group by group) at runtime with a method (equivalent to pressing the + or - button in the group header)
// AddItem event - Occurs after a new Item has been inserted to Items collection. void onEvent_AddItem(int _Item) { COM com_Items; anytype var_Items; ; var_Items = exg2antt1.Items(); com_Items = var_Items; com_Items.AddBar(_Item,"Task",com_Items.CellValue(_Item,COMVariant::createFromInt(2)),com_Items.CellValue(_Item,COMVariant::createFromInt(4))); } public void init() { COM com_Column,com_Items,com_rs; anytype rs,var_Column,var_Items; ; super(); exg2antt1.BeginUpdate(); exg2antt1.Chart().FirstVisibleDate(COMVariant::createFromDate(str2Date("9/1/1994",213))); exg2antt1.BackColorSortBar(exg2antt1.BackColor()); exg2antt1.ColumnAutoResize(false); // Add 'Microsoft ActiveX Data Objects 6.1 Library(msado15.dll)' reference to your project. rs = COM::createFromObject(new ADODB.Recordset()); com_rs = rs; rs.Open("Orders","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\\Program Files\\Exontrol\\ExG2antt\\Sample\\Access\\misc.accdb",3/*adOpenStatic*/,3/*adLockOptimistic*/); exg2antt1.DataSource(rs); exg2antt1.SortBarVisible(true); exg2antt1.SortBarCaption("Drag a <b>column</b> header here to group by that column."); exg2antt1.AllowGroupBy(true); var_Column = COM::createFromObject(exg2antt1.Columns()).Item(COMVariant::createFromInt(1)); com_Column = var_Column; com_Column.SortOrder(1/*SortAscending*/); exg2antt1.EndUpdate(); exg2antt1.BeginUpdate(); exg2antt1.EnsureVisibleColumn(COMVariant::createFromInt(0)); var_Items = exg2antt1.Items(); com_Items = var_Items; com_Items.ExpandItem(com_Items.FirstVisibleItem(),false); exg2antt1.EndUpdate(); } |
1703 |
How can I move automatically a bar once another is moved ( non-working bars )
public void init() { COM com_Bar,com_Bars,com_Chart,com_Items; anytype var_Bar,var_Bars,var_Chart,var_Items; int h,h1,h2,h3; ; super(); exg2antt1.BeginUpdate(); exg2antt1.MarkSearchColumn(false); exg2antt1.OnResizeControl(1/*exResizeChart*/); exg2antt1.Columns().Add("Tasks"); COM::createFromVariant(exg2antt1.Columns().Add("Start")).Visible(false); COM::createFromVariant(exg2antt1.Columns().Add("End")).Visible(false); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("9/20/2006",213))); /*should be called during the form's activate method*/ com_Chart.PaneWidth(0,64); var_Bars = COM::createFromObject(com_Chart.Bars()); com_Bars = var_Bars; var_Bar = COM::createFromObject(com_Bars).Add("Task:Split"); com_Bar = var_Bar; com_Bar.Shortcut("TSplit"); com_Bar.Def(20/*exBarKeepWorkingCount*/,COMVariant::createFromBoolean(true)); var_Items = exg2antt1.Items(); com_Items = var_Items; h = com_Items.AddItem("Project"); com_Items.CellValue(h,COMVariant::createFromInt(1),COMVariant::createFromDate(str2Date("9/22/2006",213))); com_Items.CellValue(h,COMVariant::createFromInt(2),COMVariant::createFromDate(str2Date("10/3/2006",213))); com_Items.AddBar(h,"Summary",com_Items.CellValue(h,COMVariant::createFromInt(1)),com_Items.CellValue(h,COMVariant::createFromInt(2))); h1 = com_Items.InsertItem(h,,"Task 1"); com_Items.CellValue(h1,COMVariant::createFromInt(1),com_Items.CellValue(h,COMVariant::createFromInt(1))); com_Items.CellValue(h1,COMVariant::createFromInt(2),COMVariant::createFromDate(str2Date("9/26/2006",213))); com_Items.AddBar(h1,"TSplit",com_Items.CellValue(h1,COMVariant::createFromInt(1)),com_Items.CellValue(h1,COMVariant::createFromInt(2))); h2 = com_Items.InsertItem(h,,"Task 2"); com_Items.CellValue(h2,COMVariant::createFromInt(1),com_Items.CellValue(h1,COMVariant::createFromInt(2))); com_Items.CellValue(h2,COMVariant::createFromInt(2),COMVariant::createFromDate(str2Date("9/28/2006",213))); com_Items.AddBar(h2,"TSplit",com_Items.CellValue(h2,COMVariant::createFromInt(1)),com_Items.CellValue(h2,COMVariant::createFromInt(2))); com_Items.AddLink("L1",h1,"",h2,""); h3 = com_Items.InsertItem(h,,"Task 3"); com_Items.CellValue(h3,COMVariant::createFromInt(1),com_Items.CellValue(h2,COMVariant::createFromInt(2))); com_Items.CellValue(h3,COMVariant::createFromInt(2),com_Items.CellValue(h,COMVariant::createFromInt(2))); com_Items.AddBar(h3,"TSplit",com_Items.CellValue(h3,COMVariant::createFromInt(1)),com_Items.CellValue(h3,COMVariant::createFromInt(2))); com_Items.AddLink("L2",h2,"",h3,""); com_Items.GroupBars(h1,"",false,h2,"",true,COMVariant::createFromInt(7)); com_Items.GroupBars(h2,"",false,h3,"",true,COMVariant::createFromInt(7)); com_Items.DefineSummaryBars(h,"",h1,""); com_Items.DefineSummaryBars(h,"",h2,""); com_Items.DefineSummaryBars(h,"",h3,""); com_Items.ExpandItem(h,true); com_Items.ItemBold(h,true); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(0,64); } */ |
1702 |
How can I get notified once the user expands a column
// LayoutChanged event - Occurs when column's position or column's size is changed. void onEvent_LayoutChanged() { ; print( "Column-Expanded" ); print( exg2antt1.Columns().Item("C0").Expanded() ); } public void init() { COM com_Column,com_Columns,com_Items; anytype var_Column,var_Columns,var_Items; int h; ; super(); exg2antt1.BeginUpdate(); exg2antt1.ShowFocusRect(false); exg2antt1.ColumnAutoResize(false); exg2antt1.DrawGridLines(-1/*exAllLines*/); exg2antt1.BackColorLevelHeader(exg2antt1.BackColor()); var_Columns = exg2antt1.Columns(); com_Columns = var_Columns; var_Column = COM::createFromVariant(com_Columns.Add("C0")); com_Column = var_Column; com_Column.ExpandColumns("0,1,2"); com_Column.DisplayExpandButton(true); com_Columns.Add("C1"); com_Columns.Add("C2"); var_Items = exg2antt1.Items(); com_Items = var_Items; h = com_Items.AddItem("Cell 0.0"); com_Items.CellValue(h,COMVariant::createFromInt(1),"Cell 0.1"); com_Items.CellValue(h,COMVariant::createFromInt(2),"Cell 0.2"); h = com_Items.AddItem("Cell 1.0"); com_Items.CellValue(h,COMVariant::createFromInt(1),"Cell 1.1"); com_Items.CellValue(h,COMVariant::createFromInt(2),"Cell 1.2"); exg2antt1.EndUpdate(); } |
1701 |
I am using expandable headers, the question is how I can display the column itself, not just the child columns
public void init() { COM com_Column,com_Columns,com_Items; anytype var_Column,var_Columns,var_Items; int h; ; super(); exg2antt1.BeginUpdate(); exg2antt1.ColumnAutoResize(false); exg2antt1.DrawGridLines(-1/*exAllLines*/); exg2antt1.BackColorLevelHeader(exg2antt1.BackColor()); var_Columns = exg2antt1.Columns(); com_Columns = var_Columns; var_Column = COM::createFromVariant(com_Columns.Add("C0")); com_Column = var_Column; com_Column.ExpandColumns("0,1,2"); com_Column.DisplayExpandButton(true); com_Columns.Add("C1"); com_Columns.Add("C2"); var_Items = exg2antt1.Items(); com_Items = var_Items; h = com_Items.AddItem("Cell 0.0"); com_Items.CellValue(h,COMVariant::createFromInt(1),"Cell 0.1"); com_Items.CellValue(h,COMVariant::createFromInt(2),"Cell 0.2"); h = com_Items.AddItem("Cell 1.0"); com_Items.CellValue(h,COMVariant::createFromInt(1),"Cell 1.1"); com_Items.CellValue(h,COMVariant::createFromInt(2),"Cell 1.2"); exg2antt1.EndUpdate(); } |